On Jan 23, 11:41 pm, Paul Zimmermann <[EMAIL PROTECTED]> wrote:
> Thus you have constructed a nice expression for 1:
>
> sage: sol[2].subs(a=1).right()
> (2/(3*sqrt(3)) + 10/27)^(1/3) - 2/(9*(2/(3*sqrt(3)) + 10/27)^(1/3)) + 1/3
>
> Quiz: how to simplify that expression to 1 within SAGE? I've tried simplify,
> and radical_simplify, but neither succeeds...

The Sage rings AA and QQbar can decide equalities between radical
expressions (over the reals and complex numbers respectively):

sage: a = AA((2/(3*sqrt(3)) + 10/27)^(1/3) - 2/(9*(2/(3*sqrt(3)) +
10/27)^(1/3)) + 1/3)
sage: a
[0.99999999999999988 .. 1.0000000000000003]
sage: a == 1
True

By the way, when I implemented AA/QQbar, I decided on the following
behavior for exponentiation:

sage: AA(-1)^(1/3)
-1
sage: QQbar(-1)^(1/3)
[0.49999999999999994 .. 0.50000000000000012] + [0.86602540378443859 ..
0.86602540378443871]*I

So when taking roots, for AA we prefer real roots if they exist, but
for QQbar we take the principal root.

Carl Witty

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to