Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 9 years ago

nbruin gravatar image

I hope there is no way to coerce Sage into returning just x, because your expression is only equal to that for a very limited number of choices for x. Sage (Maxima, really) can be convinced to make branch choices to simplify the expression to sqrt(x), but not via assumptions, apparently. This does work:

sage: var('x,y')
(x, y)
sage: E=sqrt(x/y^2)*y
sage: E.canonicalize_radical()
sqrt(x)

See the documentation of canonicalize_radical for details.