Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Well... The default Sage algorithms aren't always the most efficient.However, one can try :

sage: import sympy
sage: sympy.sympify((sqrt(2)+2)/(sqrt(2)+1)).simplify()._sage_()
sqrt(2)

We also have :

sage: ((sqrt(2)+2)/(sqrt(2)+1)/sqrt(2)).canonicalize_radical()
1

as well as :

sage: from giacpy_sage import *
sage: libgiac.simplify((sqrt(2)+2)/(sqrt(2)+1)).sage()
sqrt(2)

(this one can probably be done more economically...).

HTH...