> I suceeded to run the code.
> >>> f = Function('f')
> >>> x = Symbol('x')
> >>> diff(f(x),x)
>
> D(f(x), x)
> How about second derivatives ?
> I mean
> diff(D(f(x), x),x)
> Is there any way to get the answer ?
>
If you replace the "D" with "diff" in your example it would work:
>>> D(f(x),x)
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
NameError: name 'D' is not defined
>>> D=diff
>>> D(f(x),x)
D(f(x), x)
Either of these work, too:
>>> from sympy import *
>>> f=Function('f')
>>> x=Symbol('x')
>>> diff(f(x),x,2) # list the number of times that you want to differentiate
>>> wrt x after the x
D(f(x), x, x)
>>> diff(f(x),x,x) # or just list the x that many times
D(f(x), x, x)
/c
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.