I assumed that SageMath converts the functions into symbolic expressions. If I enter the following it will work:
f=lambda x: x*sin(x) diff(f(x),x) def g(x): return x*sin(x) diff(g(x),x) On Wednesday, August 10, 2016 at 4:01:09 PM UTC-5, Harald Schilly wrote: > > On Wed, Aug 10, 2016 at 10:46 PM, Todd Zimmerman > <todd.zimm...@gmail.com <javascript:>> wrote: > > You can integrate and differentiate both types of functions in SageMath > as > > well as use them for solving differential equations. > > So, can you copy/paste us an example? It does work, if that small > python-function is evaluated and returns a symbolic expression. That > will work, I don't doubt that, but the python-function in itself is > then no longer part of this. Key for understanding this is, that > nested functions are evaluated from the inside out and there is no > direct concept of lazyness in Python. In some situations, it might > look like that, so I fully understand that this is confusing. > > -- h > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.