Discretization error in numerical

linear algebranumerical methods

I have been able to find the formula to approximate $f''(x_0)$ which uses $f( x_0),f\left(x_0+\frac{h}{2}\right)$ and $f(x+2h)$ with some help, which is the following:

$$f''(x_0)
=\frac{f(x_0+2h)-4f(x_0+h/2)+3f(x_0)}{\frac32h^2}.$$

Now I am trying to find the formula for the leading term in the discretization error.

Is this the proper equation to use to find this?

$$E(h) = f''_{exact} – f''(h) \approx Ah^p$$ where $h$ is a measure of the mesh discretization, $A$ is a constant, and $p$ is the rate of convergence. If so how can I use this formula with my given answer from above?

Best Answer

If you plugin the Taylor expansion $$f(x_0+h/2) = f(x_0) + \frac{1}{2}h f'(x_0)+ \frac{1}{8}h^2 f''(x_0) + \frac{1}{48}h^3 f'''(x_0) + \frac{1}{384}h^4 f''''(x_0)+ O(h^5)$$ and similar $$f(x_0+2h) = f(x_0) +2hf'(x_0) + 2h^2f''(x_0) + \frac{4}{3}h^3f'''(x_0) + \frac{2}{3}h^4f''''(x_0) + O(h^5) $$ into you formula your get $$f''(x_0) = f''(x_0,h) + \frac{5}{6}f'''(x_0)h + O(h^2)$$ from which you read-off $$f''(x_0)-f''(x_0, h) = \frac{5}{6}f'''(x_0)h + O(h^2)$$ and therefore

$$A=\frac{5}{6}f'''(x_0), \quad p=1$$