When function f is a function of x, sympy diff output is diff(f,x) =
0.
I hope output should be dx(f). Is this output possible for current
sympy ?
czbebe
I get the following:
>>> f = Function('f')
>>> x = Symbol('x')
>>> diff(f(x),x)
D(f(x), x)
Did you use f(x) or did you use f? Could you copy and paste the exact
input and output involved? That would me to understand what exactly
you are trying to do.
/smichr
Thanks in advance,
czbebe
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
Aaron Meurer
Sent from my iPod touch.
> --
> You received this message because you are subscribed to the Google
> Groups "sympy" group.
> To post to this group, send email to sy...@googlegroups.com.
> To unsubscribe from this group, send email to sympy+un...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/sympy?hl=en
> .
>
>