Ask Your Question

How to simplify complicated expressions

asked 2018-08-10 16:38:52 -0500

macavema gravatar image

updated 2018-08-11 05:30:56 -0500


This complicated expression would be a zero function, but I can't achive to simplify it. I think I've run into lots of expressions like this one, but I've never come up with a solution.

This is mi code:

var('R d',domain='positive')

f=(R*cos(t) - d)*p/(-2*R*d*cos(t) + R^2 + d^2)^(3/2) + (R*cos(t) -R^2/d)*R^3*p/((-2*R^3*cos(t)/d + R^2 + R^4/d^2)^(3/2)*d^3) +R*p/(sqrt(-2*R^3*cos(t)/d + R^2 + R^4/d^2)*d^2
edit retag flag offensive close merge delete


Thanks for your edits. Your question is much easier to read and to work on now.

slelievre gravatar imageslelievre ( 2018-08-11 15:52:32 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2018-08-11 03:30:56 -0500

slelievre gravatar image

For simplifying expressions involving square roots, it often helps to use the canonicalize_radical method.

In your case:

sage: f.canonicalize_radical()
edit flag offensive delete link more


Problem solved, thank you very much !

macavema gravatar imagemacavema ( 2018-08-11 05:32:52 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-08-10 16:38:52 -0500

Seen: 37 times

Last updated: Aug 11