Access to Maxima methods

class sage.symbolic.maxima_wrapper.MaximaFunctionElementWrapper(obj, name)

Bases: sage.interfaces.interface.InterfaceFunctionElement

class sage.symbolic.maxima_wrapper.MaximaWrapper(exp)

Bases: sage.structure.sage_object.SageObject

Wrapper around Sage expressions to give access to Maxima methods.

We convert the given expression to Maxima and convert the return value back to a Sage expression. Tab completion and help strings of Maxima methods also work as expected.

EXAMPLES:

sage: t = log(sqrt(2) - 1) + log(sqrt(2) + 1); t
log(sqrt(2) + 1) + log(sqrt(2) - 1)
sage: u = t.maxima_methods(); u
MaximaWrapper(log(sqrt(2) + 1) + log(sqrt(2) - 1))
sage: type(u)
<class 'sage.symbolic.maxima_wrapper.MaximaWrapper'>
sage: u.logcontract()
log((sqrt(2) + 1)*(sqrt(2) - 1))
sage: u.logcontract().parent()
Symbolic Ring
sage()

Return the Sage expression this wrapper corresponds to.

EXAMPLES:

sage: t = log(sqrt(2) - 1) + log(sqrt(2) + 1); t
log(sqrt(2) + 1) + log(sqrt(2) - 1)
sage: u = t.maxima_methods().sage()
sage: u is t
True