Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There are a few ways to do this, though I do not know exactly what you need for this so it may or may not fill your needs.

sage: f = x.mul(1/x,hold=True)
sage: f
sage: f(x=3)
sage: f(x=0)
RuntimeError: power::eval(): division by zero

However, this will still give

sage: f.derivative(x)

So I don't know if this is exactly what you want. Also, we still don't have a way to 'unhold' other than simplification at this time.

sage: f.simplify()