Just to be clear why I dislike it:

In [1]: f(g(x)).diff(x).subs(g(x), Lambda(x, 2*x))
Out[1]:

⎛  d           ⎞│               d
⎜─────(f(g(x)))⎟│              ⋅──(Λ(x, 2⋅x))
⎝dg(x)         ⎠│g(x)=Λ(x, 2⋅x) dx

In [2]: f(g(x)).diff(x).subs(g(x), Lambda(x, 2*x)).doit()
Out[2]: 0

It is not simply inconvenient to substitute. It is simply wrong! The
derivative is not 0


On 23 June 2012 20:34, [email protected]
<[email protected]> wrote:
> This is unrelated to my previous post about _diff_wrt:
>
> The problem:
>
> In [5]: f(g(x)).diff(x)
> Out[5]: Derivative(f(g(x)), g(x))*Derivative(g(x), x)
>
> Which according to the rest of SymPy should be
>
> Out[5]: Subs(Derivative(f(_x), _x), (_x,), (g(x),))*Derivative(g(x), x)
>
> It is nice to have _diff_wrt, however a Derivative instance with
> anything different than a symbol/dummy is complete nonsense. I hope
> that somebody can help me with this, because the current behavior of
> this function is nonsensical and blocks my work.

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

Reply via email to