Looks as a bug for me.
Our bugtracker:
https://github.com/sympy/sympy/issues
On Tuesday, July 29, 2014 1:29:59 AM UTC+4, J. S. Oishi wrote:
>
> Hi all,
>
> I'm using sympy 0.7.4.1, and I've come across an issue I don't quite
> understand. If I do
>
> from sympy import *
> x,z,t = symbols('x, z, t')
>
> psi = Function('psi')(x,z)
>
> j1 = Derivative(psi,x) - Derivative(psi,z)
>
> j1.subs(Derivative(psi,x), t)
>
> I get what I expect, t - d psi/dx. However, if I do the same thing with a
> second derivative with respect to z, I get the following:
>
> j2 = Derivative(psi,x) - Derivative(psi,z,2)
>
> j2.subs(Derivative(psi,x), t)
>
> it returns t - d^2 t/dz^2. I expect it to return t - d^2 psi/dz^2. Can
> anyone point me to anything I might be doing wrong? I've tried defining t
> as a Function, rather than as a symbol (t = Function('t')(x,z)), but that
> does the exact same thing. I've also tried writing the second derivative in
> j2 as Derivative(psi,z,z), but that also does the same thing (which I would
> expect).
>
> I've found this behavior both on my computer with Python 3.3.2 and on the
> sympy live shell on sympy.org, which is currently SymPy 0.7.4.1 (Python
> 2.7.5).
>
> Any advice you could provide would be very helpful.
>
>
> thanks,
>
>
> Jeff
>
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/be250a32-5198-4f24-b538-3763f3efad1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.