Ask Your Question
0

strange way to simplify square roots

asked 2012-11-14 06:48:49 -0500

mathematicboy gravatar image

updated 2013-11-06 10:32:10 -0500

tmonteil gravatar image

Hi!

Let us consider the number

a=1/sqrt(4-2*sqrt(3))-1/(sqrt(3)-1)

which is zero. If we simplify

a.simplify_full().n()

we obtain

-2.73205080756888 - 8.36449319149292e-17*I,

which of course is false. I guess it is a problem handling complex roots of degree four, but still, it don't seems to me a reasonable computation. ┬┐Anybody knows how to fix it?

edit retag flag offensive close merge delete

2 answers

Sort by ┬╗ oldest newest most voted
0

answered 2013-11-06 03:48:08 -0500

kcrisman gravatar image

Update: Trac 12737 has been merged in Sage.

sage: a=1/sqrt(4-2*sqrt(3))-1/(sqrt(3)-1)
sage: a.simplify_full().n()
-4.14340873563388e-16
edit flag offensive delete link more
0

answered 2012-11-14 07:16:51 -0500

kcrisman gravatar image
sage: a.simplify_full()
-(sqrt(sqrt(3) - 2)*sqrt(2) + I*sqrt(3) - I)/(sqrt(sqrt(3) - 2)*(sqrt(2)*sqrt(3) - sqrt(2)))

See Trac 12737 for what the problem likely is for this. In my view, this is buyer beware of simplification (!) but at any rate to be fair I will link this question there as well. For now:

sage: a.simplify_trig()
-(sqrt(-2*sqrt(3) + 4) - sqrt(3) + 1)/(sqrt(-2*sqrt(3) + 4)*(sqrt(3) - 1))
sage: a.simplify_trig().n()
-4.14340873563388e-16
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

Stats

Asked: 2012-11-14 06:48:49 -0500

Seen: 442 times

Last updated: Nov 06 '13