Comment #16 on issue 1654 by asmeurer: subs() doesn't substitute lower derivatives into higher order ones
http://code.google.com/p/sympy/issues/detail?id=1654

I think we should do one of the following:

1. Keep track of if the Derivative was instantiated with diff or Derivative,
2. Use a different method to "differentiate" between when it should sort args or not 3. Just assume that a Derivative object was instantiated in unevaluated form.

Of these, I think 1. is the best. I don't like the idea of guessing based on if the args are sorted or not.

Also consider in your tests the cases diff.subs(Derivative) and Derivative.subs(diff).

By the way, your bug reminds me of issue 1888 and issue 1604. In those issues, integrate() was giving strange answers for Derivative objects, and it was because Derivative.subs() was evaluating the derivative, removing the information that it depended on some variables after some dummy variable substitutions in the integration algorithm. This was fixed by issue 2049, which made Derivative.subs always return an unevaluated Derivative.

So I would check that you aren't evaluating unevaluated Derivative objects with your subs routine, even in (actually especially in) trivial cases.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" 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-issues?hl=en.

Reply via email to