With d=c-a, not even d.simplify_radical() gives 0.

Simplifying "nested radicals" is a notoriously hard problem in
symbolic computer algebra.  As this example shows (unless there are
other tricks to try which I do not know about), Sage's symbolic system
is not up to examples like this.

As an algebraist I would use a different approach.  Note that
sage: type(a)
<type 'sage.symbolic.expression.Expression'>
but as these quantities are all algebraic one can also use
sage: QQbar
Algebraic Field

for example

sage: QQbar(a) == QQbar(c)
True

Behind the scenes, this is checking first that a and c have the same
minimal polynomial:
sage: QQbar(a).minpoly()
x^4 - 4*x^3 - 4*x^2 + 16*x - 8
sage: QQbar(c).minpoly()
x^4 - 4*x^3 - 4*x^2 + 16*x - 8
and also (by using numerical approximations to whatever precision is
necessary) that they are the same root of that poly.

John Cremona


On Jul 5, 11:38 pm, robin hankin <hankin.ro...@gmail.com> wrote:
> Hi.  I am having difficulty using sage to manipulate surds.
>
> Consider:
>
> a = 1 + sqrt(2) + sqrt(3)
> b= (a^2).expand()
> c = sqrt(b)
>
> Then 'y' should be equal to 'a'.
>
> But, given 'y' I cannot make sage return the simple form.
> Trying
>
> y.simplify_full()
>
> doesn't do what I want.
>
> How do I make sage recognize that a=c, other than using n()?
>
> --
> Robin Hankin
> Uncertainty Analyst
> hankin.ro...@gmail.com

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to