Ask Your Question

How to simplify complicated expressions

asked 2018-08-10 23:38:52 +0200

macavema gravatar image

updated 2018-08-11 12:30:56 +0200


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 22:52:32 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-08-11 10:30:56 +0200

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 12:32:52 +0200 )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 23:38:52 +0200

Seen: 17,358 times

Last updated: Aug 11 '18