On Wednesday, August 10, 2016, Todd Zimmerman <todd.zimmerman....@gmail.com>
wrote:

> 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)
>

f is a python function

f(x) is a symbolic expression - the result of calling f with input 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> 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
> <javascript:_e(%7B%7D,'cvml','sage-support%2bunsubscr...@googlegroups.com');>
> .
> To post to this group, send email to sage-support@googlegroups.com
> <javascript:_e(%7B%7D,'cvml','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.
>


-- 
Sent from my massive iPhone 6 plus.

-- 
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.

Reply via email to