[sympy] MutliVariable symbolic finite differences

2016-03-19 Thread Mathias Louboutin
Hi I am working on PDE's and I am trying to get the symbolic expression for multivariabe finite differences mainly I wan the expression for d/dx(d/dy f), however d2pdxdy=as_finite_diff(p(x,y,z,t).diff(x,y),[x,x-h,y,y+h]) doesn't work, nor any possible combination. Is this just not implemented

Re: [sympy] MutliVariable symbolic finite differences

2016-03-19 Thread Aaron Meurer
What is the answer that you would expect to get? Aaron Meurer On Wed, Mar 16, 2016 at 12:12 PM, Mathias Louboutin wrote: > Hi > > I am working on PDE's and I am trying to get the symbolic expression for > multivariabe finite differences > > mainly I wan the expression for d/dx(d/dy f), however >

Re: [sympy] MutliVariable symbolic finite differences

2016-03-19 Thread Mathias Louboutin
.5 * (p(x,y+h) - p(x,y) - p(x-h,y+h) + p(x-h,y+h) ) / h^2 Le mercredi 16 mars 2016 21:09:53 UTC, Aaron Meurer a écrit : > > What is the answer that you would expect to get? > > Aaron Meurer > > On Wed, Mar 16, 2016 at 12:12 PM, Mathias Louboutin > > wrote: > > Hi > > > > I am working on PDE

Re: [sympy] MutliVariable symbolic finite differences

2016-03-19 Thread Mathias Louboutin
In this example case it would give .25 * ( p(x,y+h,z,t) - p(x,y,z,t) + p(x-h,y,z,t) - p(x-y,y+h,z,t) ) /h^2 But more generally I would want to be able to take the result of as_finite_diff as a new expression I can differentiate : a = as_finite_diff ( f(.).diff(x) ) b= as_finite_diff( a.di

Re: [sympy] MutliVariable symbolic finite differences

2016-03-18 Thread Aaron Meurer
As far as I can tell, the function only supports finite differences of one variable at a time. My guess is that it wouldn't be too hard to extend it to do what you want, though. Aaron Meurer On Thu, Mar 17, 2016 at 7:07 AM, Mathias Louboutin wrote: > In this example case it would give > > .25 *