1 | initial version |
Did you read TFM? There is a Converter
class to build your own expressions trees: http://www.sagemath.org/doc/reference/sage/symbolic/expression_conversions.html
If you want to do it by hand you can use
sage: eq = x*sin(x)
sage: eq.op
Operands of x*sin(x)
sage: list(eq.op)
[x, sin(x)]
but I'd recommend you use the Converter