On Sun, Jun 19, 2011 at 9:30 PM, Chris Smith <[email protected]> wrote: > > > On Sun, Jun 19, 2011 at 7:05 PM, Renato Coutinho <[email protected]> > wrote: >> >> Hello, >> >> On Sun, Jun 19, 2011 at 3:51 PM, Mani Chandra <[email protected]> wrote: >> > Hi, >> > Is it possible to tell simplify that the partial derivatives with >> > respect to >> > two different variable commute so that it can simplify further? For ex: >> > d^2 f/dxdy + d^2 f/dydx >> > The above expression is left as it is by simplify(), but it would be >> > nice if >> > there were some way to tell it about the commutation so that it can >> > simplify >> > further. >> >> This is fixed in current development version, so that >> >> >>> f(x, y).diff(x, y) - f(x, y).diff(y, x) >> 0 >> >> If you don't want this to happen, you have to use unevaluated >> derivatives (diff() always evaluates them): >> >> >>> Derivative(f(x, y), x, y) - Derivative(f(x, y), y, x) >> D(f(x, y), x, y) - D(f(x, y), y, x) >> > > Notice that he used "+" not "-" -- does he want `2*D(f(x,y), x, y)` to be > returned?
Yes, I think that's what he meant, and it works too, returning 2*D(f(x, y), x, y). -- 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.
