An archive of Mark's Spring 2018 Numerical Analysis course.

Deriving a difference quotient

mark

Part 1

Show that

f''(x) \approx \frac{2f(x+h) - 3f(x)+f(x-2h)}{3h^2}.

What is the order of the approximation expressed in O notation?

Part 2

Apply part 1 to the data set

\begin{array}{c|cccc} x&0 & 0.2 & 0.3 & 0.4 \\ \hline y&1 & 1.22 & 1.27 & 1.28 \\ \end{array}
mark
mark
nathan

Part 1

First let’s write out the Taylor expansion for 2f(x+h) and f(x-2h).

f(x-2h) \approx f(x) - 2f'(x)h + 2f''(x)h^{2} + O(h^{3})
2f(x+h) \approx 2f(x) + 2f'(x)h + f''(x)h^2 + O(h^3)

If we add these two equations together we get:

f(x-2h) - 3f(x) + 2f(x+h) \approx 3f''(x)h^2 + 2O(h^3).

Now divide both sides by 3h^2.

f''(x) \approx \frac{2f(x+h) - 3f(x) + f(x-2h)}{3h^2} - O(h)

Part 2

Our value of h will be \Delta x since we are restricted by these four data points. So, h=0.1. The question does not specify which x value that we need to approximate the second derivative for, but as it turns out, f''(0.2) is the only one allowed given the data.

f''(0.2) \approx \frac{2f(0.3) - 3f(0.2) + f(0)}{0.03}
\approx \frac{2(1.27) - 3(1.22) + 1}{0.03}
f''(0.2) \approx -4