Evaluating the error with respect Numerical Differentiation

57 Views Asked by At

Hi guys i am attempting the following question

enter image description here

Therefore based on the points given i decided to evaluate using the taylor series expansion

$$f(x+2h) = f(x) + 2hf'(x)+\frac{2h^2 f''(x)}{2!}+\frac{2h^3f'''(x)}{3!}$$ In a similar manner i evaluated at $$f(x-2h) = f(x) - 2hf'(x)+\frac{2h^2 f''(x)}{2!}-\frac{2h^3f'''(x)}{3!}$$

I then made f'''(x) the subject of the equation

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

Now the error is given by the following the

$$f'''(x) - D'''_h f(x)$$

Im not sure how to evaluate the error and show the order can anyone help

3

There are 3 best solutions below

0
On BEST ANSWER

The function $$ g(h)=\frac{f(x+h)-f(x-h)}2 $$ is odd in $h$, its Taylor series is composed of the odd degree terms of the Taylor series of $f$, $$ g(h)=f'(x)h+\frac16f'''(x)h^3+\frac1{120}f^{(5)}(x)h^5+O(h^7). $$ The divided difference expression can be written as $$ \frac{g(2h)-2g(h)}{h^3}=\frac16f'''(x)[2^3-2]+\frac1{120}f^{(5)}(x)[2^5-2]h^2+\frac1{7!}f^{(7)}(x)[2^7-2]h^4+... \\ =f'''(x)+\frac14f^{(5)}(x)h^2+\frac1{40}f^{(7)}(x)h^4+... $$

2
On

Start with $f(x+h) =f(x)+hf'(x)+h^2f''(x)/2+h^3f'''(x)/6+O(h^4) $.

This gives $f(x+h)-f(x-h) =2hf'(x)+h^3f'''(x)/3+O(h^4) $ and, with $2h$ for $h$, $f(x+2h)-f(x-2h) =4hf'(x)+8h^3f'''(x)/3+O(h^4) $.

Combining these,

$\begin{array}\\ f(x+2h)-2f(x+h)+2f(x-h)-f(x-2h)\\ =f(x+2h)-f(x-2h)-2(f(x+h)-f(x-h))\\ =4hf'(x)+8h^3f'''(x)/3+O(h^4)-2(2hf'(x)+h^3f'''(x)/3+O(h^4))\\ =4hf'(x)-4hf'(x)+8h^3f'''(x)/3-2h^3f'''(x)/3+O(h^4))\\ =2h^3f'''(x)+O(h^4))\\ \end{array} $

$\begin{array}\\ \text{so}\\ D_h'''(x) &=\dfrac{f(x+2h)-2f(x+h)+2f(x-h)-f(x-2h)}{2h^3}\\ &=f'''(x)+O(h)\\ \end{array} $

1
On

Using $$f(x+k h)=f(x)+h k f'(x)+\frac{1}{2} h^2 k^2 f''(x)+\frac{1}{6} h^3 k^3 f^{(3)}(x)+$$ $$\frac{1}{24} h^4 k^4 f^{(4)}(x)+\frac{1}{120} h^5 k^5 f^{(5)}(x)+\frac{1}{720} h^6 k^6 f^{(6)}(x)+O\left(h^7\right)$$ the numerator write $$2 h^3 f^{(3)}(x)+\frac{1}{2} h^5 f^{(5)}(x)+O\left(h^7\right)$$ Divide hy $2h^3$ to get $$f^{(3)}(x)+\frac{1}{4} h^2 f^{(5)}(x)+O\left(h^4\right)=f^{(3)}(x)+O\left(h^2\right)$$