Mon 2017-09-16 20:22:25 UTC, Emily G:
> I am trying to find out whether I can get Sage to simplify expressions
> such as these (and other radicals that are not square root):
>
> (2 + sqrt(2))/(1 + sqrt(2))
>
> The above example should simplify to sqrt(2), but simplify_full() and
> canonicalize_radical() don't work. Is there a way that I can get Sage
> to simplify such expressions?
>
> Note: a work-around would be to replace the symbolic expression
> with a real number by writing 2^0.5, but that's not ideal.
You could convert your symbolic expression involving radicals
to an element of the field of algebraic numbers.
sage: a = (2 + sqrt(2))/(1 + sqrt(2))
sage: QQbar(a)
1.414213562373095?
sage: QQbar(a).radical_expression()
sqrt(2)
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.