First time here? Check out the FAQ!

Ask Your Question
0

strange way to simplify square roots

asked 12 years ago

mathematicboy gravatar image

updated 2 years ago

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?

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
0

answered 12 years ago

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
Preview: (hide)
link
0

answered 11 years ago

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
Preview: (hide)
link

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: 12 years ago

Seen: 801 times

Last updated: Nov 06 '13