Updates:
Labels: -NeedsReview NeedsBetterPatch
Comment #5 on issue 1816 by asmeurer: Adding partial derivatives and taking
derivatives with respect to functions
http://code.google.com/p/sympy/issues/detail?id=1816
Tests and docs would be nice. So far, I get
In [2]: diff(f(x), x).diff(f(x))
Out[2]:
d
──(1)
dx
I'm not sure what should be returned there. I *think* it should be 0, in
which case this is technically right. This shows up in the kind of
expressions that we want to be able to work with, i.e., expressions
containing both f(x) and f(x).diff(x):
In [6]: (sin(f(x)) - cos(diff(f(x), x))).diff(f(x))
Out[6]:
⎛d ⎞ d
sin⎜──(f(x))⎟⋅──(1) + cos(f(x))
⎝dx ⎠ dx
I think this is just because the Derivative(1, x) remains unevaluated. The
fix suggested in comment 16 of issue 1654 should fix this, i.e., keep track
of whether a Derivative is unevaluated because it was initiated that way or
because it had to be that way. Currently, subs doesn't evaluate a
Derivative, even in trivial cases (see issue 2049), which is a good thing
(it's fixed issue 1888 and issue 1604 for example), but we don't
necessarily want it here.
Regarding issue 1654, I get
In [5]: diff(f(x), x, x).diff(diff(f(x), x))
Out[5]: 0
Again, this is all too confusing for me to tell if that's right or not, and
if not, what should really be returned.
--
You received this message because you are subscribed to the Google Groups
"sympy-patches" group.
To post to this group, send email to sympy-patches@googlegroups.com.
To unsubscribe from this group, send email to
sympy-patches+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy-patches?hl=en.