Ask Your Question
0

Why doesn't Sage evaluate to zero on its own found roots?

asked 2015-01-21 03:00:02 +0100

Phoenix gravatar image

updated 2015-01-21 04:24:46 +0100

calc314 gravatar image
g(x) = x^4 - 6*x^2 - 2*sqrt(5)*x + 2*x + 1/2*sqrt(5) - 1/2

g(x).solve(x)

This gave,

[x == -1/2*sqrt(-2*sqrt(5) + 10) - 1, x == 1/2*sqrt(-2*sqrt(5) + 10) - 1, x == -1/2*sqrt(2*sqrt(5) + 6) + 1, x == 1/2*sqrt(2*sqrt(5) + 6) + 1]

But then g(1/2*sqrt(-2*sqrt(5) + 10) -1 ).simplify() is not zero! (same for the other roots!)

What is going on!?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-01-21 04:27:51 +0100

calc314 gravatar image

If you use g(-1/2*sqrt(-2*sqrt(5) + 10) - 1).simplify_full(), you do get 0. When there are lots of square roots in an expression, Sage (actually, Maxima) requires that you do simplify_full to simplify those effectively.

edit flag offensive delete link more

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: 2015-01-21 03:00:02 +0100

Seen: 252 times

Last updated: Jan 21 '15