> Why should one want to turn a Python function (or method) into a 
> symbolic function? I guess one couldn't do calculus (differentiate, 
> integrate) the resulting symbolic function, or can one? So, beyond 
> calculus, what can one do with a symbolic function that can't be done 
> with a Python function? 
>

You can differentiate and integrate, but the result will be formal:

diff(steps(x),x)
D[0](steps)(x)

That's already more than you can do with Python functions. Additionally, 
you can specify a derivative_func to the decorator that returns the exact 
derivative.

Also, this allows you to use the function in an expression and have it 
simplify. For example,

2*steps(x) - steps(x) - steps(x)

will be zero. 

-- 
-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org



Reply via email to