# Numeric Differentiation of Analytic funtion

Can anyone validate if my understanding regarding numeric differentiation is correct??

$z = f(x,y)$ is an analytic function. $$\frac{\partial z}{\partial x} = \frac{f(x+h,y)-f(x,y)}{h}$$ $$\frac{\partial z}{\partial y} = \frac{f(x,y+h)-f(x,y)}{h}$$

-
The limit as h goes to 0 is the derivative on continuous functions. The way written above works well for discrete functions (aka x = 0,1,2,3.... and h=1). – kaine Feb 5 '13 at 14:52

$$\frac{\partial z}{\partial x} \approx\frac{f(x+h,y)-f(x,y)}{h}$$ $$\frac{\partial z}{\partial y} \approx \frac{f(x,y+h)-f(x,y)}{h}$$
Note that there are different ways to approximate the derivative. The most common ones are forward, backward and central differences. $$\frac{\partial z}{\partial y} \approx \frac{f(x,y+h)-f(x,y)}{h}\approx \frac{f(x,y)-f(x,y-h)}{h}\approx \frac{f(x,y+h)-f(x,y-h)}{2h}$$
And if you take the limit you get $$\frac{\partial z}{\partial x} =\lim_{h\rightarrow 0}\frac{f(x+h,y)-f(x,y)}{h}$$ $$\frac{\partial z}{\partial y}= \lim_{h\rightarrow 0}\frac{f(x,y+h)-f(x,y)}{h}$$
Yes, even though it is rather $\approx$ than $=$. – k1next Feb 5 '13 at 16:39