Comment #8 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
I claim that the following is *now* correct even though this is different
from what wsa given after 1620 was fixed.
Hmm. This is tricky. If you assert that differentiation with respect to
functions is allowable, then it might be considered correct. Previously,
this was bad not just because it was wrong but also because you couldn't
recreate it with Derivative(f(g(x)), g(x)).
The definition of the chain rule definitely states "evaluated at the
point...". See
http://en.wikipedia.org/wiki/Chain_rule#Statement_of_the_rule. But this
same article has dy/dx = dy/du*du/dx, where y = f(u) and u = g(x), in other
words, it's basically taking the derivative with respect to g(x) when it
says dy/du.
Personally, I think the *best* solution would be to implement the D
operator from issue 1620 and have it return what Maple returns:
diff(f(g(x)), x);
/d \
D(f)(g(x)) |-- g(x)|
\dx /
Note that comparing against Maple here isn't 100% fair since Maple does not
allow diff(f(g(x)), g(x)).
So anyway, I suppose having it return that (Derivative(f(g(x)),
g(x))*Derivative(g(x), x)) is OK. Perhaps we should have some way to
convert that into an expression with Subs and only Derivatives with respect
to Symbols.
And this should all be very well documented, because it's not just subtle,
but also very confusing.
--
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.