Numerical Differentiation using Taylor series

448 Views Asked by At

Hi Guys currently doing some Numerical Differentiation and I was looking at the different formulas such as 1) forward difference method 2) backward difference method 3) central difference method

$$\frac{f(x+h)-f(x)}{h}$$

$$\frac{f(x)-f(x-h)}{h}$$

$$\frac{f(x+h)-f(x-h)}{2}$$

Now based on using taylor's series, I know we can derive different or higher orders for the derivatives for example if i required $$f''(x)$$

using Taylor's series

$$f(x+h) = f(x)+f'(x)h+\frac{f''(x)h^2}{2!}+\frac{f'''(x)h^3}{3!}$$

$$f(x-h) = f(x)-f'(x)h+\frac{f''(x)h^2}{2!}-\frac{f'''(x)h^3}{3!}$$

$$\frac{f(x+h)-2f(x)+f(x-h)}{h^2} = f''(x)$$

My question is as I am bot confused to define the third derivative when using the Taylor series when making the substitution from the Taylor series and this is my approach then adding both equations $$f(x+h) + f(x-h)$$

$$f(x+h)-2f(x)+h^2f''(x)+f(x-h) = \frac{h^3f^3(x)}{3!} - \frac{h^3f^3(x)}{3!}$$

then I decided to try $$f(x+h) - f(x-h) = hf(x)+hf(x)+\frac{2h^3f'''(x)}{3!}$$

$$\frac{3![f(x+h)+2h(x)-f(x-h)]}{2h^3} = f^3(x)$$

and this is incorrect so I am hoping someone can help me understand defining higher order derivatives when using the Taylor series for these methods.

Essentially I am trying to understand how to attain

$$f^3(x),f^4(x),.. etc $$

etc using the Taylor series