Central difference quotient in two variables.

638 Views Asked by At

I was asked to compute the difference quotient approximation for a function $u(x,y)$ of two variables namely $$ \frac{\partial^2 u}{\partial x \partial y}(x,y) $$ Here is what I did: use the approximation for $\partial y$ $$ \frac{\partial }{\partial x}\left[\frac{u(x,y+h)-u(x,y-h)}{2h}\right] $$ then we have $$ \frac{1}{2h}\left( \left[ \frac{u(x+h,y+h)-u(x-h,y+h)}{2h} \right] - \left[ \frac{u(x+h,y-h)-u(x-h,y-h)}{2h} \right] \right) $$ puting it all together we have $$ \frac{u(x+h,y+h)+u(x+h,y-h)-(u(x-h,y-h)+u(x-h,y+h))}{4h^2} $$ is that the general formula? I feel like I am missing something is there anything else to do? also my numerical analysis book sayes the error of the approximation is $\mathrm{O}(h^2)$ why is this

1

There are 1 best solutions below

0
On

You got signs wrong after going from the second to the third line. After you get it right, make a taylor expansion of the expression with respect to h up to the fourth order, and you'll get the answer: $\frac{1}{6} h^2 \left(u^{(1,3)}(x,y)+u^{(3,1)}(x,y)\right)$