Ask Your Question

Revision history [back]

Given the Sage object h you can see which methods apply to it, with the tab completion:

sage: h.<TAB>

You will see that there is an expression method:

sage: h.expression()
(-t + 1, sqrt(-t^2 + 2*t))

This is a tuple, and you can get its entrie as follows:

sage: h.expression()[0]
-t + 1
sage: h.expression()[1]
sqrt(-t^2 + 2*t)