Ask Your Question
2

How to simplify complicated expressions

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

macavema gravatar image

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

Hello,

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')
var('p',domain='real')
var('t',domain='real',latex_name="\\theta")

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

Comments

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 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
4

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

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()
0
edit flag offensive delete link more

Comments

Problem solved, thank you very much !

macavema gravatar imagemacavema ( 2018-08-11 12:32:52 +0100 )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

Stats

Asked: 2018-08-10 23:38:52 +0100

Seen: 19,882 times

Last updated: Aug 11 '18