Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The maxima_methods thing is very useful. Unfortunately, I'm not sure how to get the algebraic keyword in other than the way pointed out below. We have to let Maxima evaluate it.

sage: a = 1 / (2 * sqrt(2) + 3)
sage: a.maxima_methods().ratsimp()
1/(2*sqrt(2) + 3)
sage: a
1/(2*sqrt(2) + 3)
sage: a._maxima_()
1/(2^(3/2)+3)
sage: A = a._maxima_()
sage: A.parent()
Maxima_lib
sage: A.parent().eval('algebraic:true;')
'true'
sage: a.maxima_methods().ratsimp()
-2*sqrt(2) + 3