[proofplan]
We expand $g(x - h)$ and $g(x + h)$ as Taylor series about $x$ up to order six, then form the linear combination $g(x - h) - 2g(x) + g(x + h)$. The odd-order terms ($h, h^3, h^5$) cancel by symmetry (each appears with equal magnitude but opposite sign in $g(x - h)$ and $g(x + h)$), and the even-order terms combine to give $h^2 g''(x) + \frac{1}{12}h^4 g^{(4)}(x) + \mathcal{O}(h^6)$.
[/proofplan]
[step:Expand $g(x \pm h)$ in Taylor series about $x$ up to order six]
Since $g \in C^4[a, b]$ and $x \in (a + h, b - h)$, the points $x - h$ and $x + h$ lie in $[a, b]$, so we may expand $g$ in a Taylor series about $x$. By Taylor's theorem with Lagrange remainder, for any $C^6$ function the expansion is exact to sixth order; since we only assume $g \in C^4$, we write the expansion using the $C^4$ regularity and group all terms of order $h^5$ and higher into the remainder:
\begin{align*}
g(x + h) &= g(x) + h g'(x) + \frac{h^2}{2} g''(x) + \frac{h^3}{6} g'''(x) + \frac{h^4}{24} g^{(4)}(x) + \mathcal{O}(h^5), \\
g(x - h) &= g(x) - h g'(x) + \frac{h^2}{2} g''(x) - \frac{h^3}{6} g'''(x) + \frac{h^4}{24} g^{(4)}(x) + \mathcal{O}(h^5).
\end{align*}
Here the $\mathcal{O}(h^5)$ remainder is uniform for $x$ in a compact subset of $(a + h, b - h)$, and depends on the modulus of continuity of $g^{(4)}$.
[guided]
The second central difference $\Delta_h^* g(x) = g(x - h) - 2g(x) + g(x + h)$ is a linear combination of the values of $g$ at three points spaced $h$ apart. To understand what this difference operator measures, we expand each evaluation point using Taylor's theorem.
Since $g \in C^4[a, b]$ and $x \in (a + h, b - h)$, both $x + h$ and $x - h$ lie within $[a, b]$, so the Taylor expansion about $x$ is valid at both points. We expand to fourth order (the highest derivative available) and collect the remainder:
\begin{align*}
g(x + h) &= g(x) + h g'(x) + \frac{h^2}{2} g''(x) + \frac{h^3}{6} g'''(x) + \frac{h^4}{24} g^{(4)}(x) + \mathcal{O}(h^5), \\
g(x - h) &= g(x) + (-h) g'(x) + \frac{(-h)^2}{2} g''(x) + \frac{(-h)^3}{6} g'''(x) + \frac{(-h)^4}{24} g^{(4)}(x) + \mathcal{O}(h^5).
\end{align*}
Note the sign pattern: even powers of $(-h)$ are positive ($(-h)^2 = h^2$, $(-h)^4 = h^4$), while odd powers are negative ($(-h)^1 = -h$, $(-h)^3 = -h^3$). This sign structure is what causes the cancellation in the next step.
Strictly speaking, the remainder term $\mathcal{O}(h^5)$ is controlled by Taylor's theorem applied to $g^{(4)}$: for the integral form of the remainder, the fifth-order term involves $\int_x^{x \pm h} \frac{(x \pm h - t)^4}{4!} g^{(4)}(t) \, d\mathcal{L}^1(t)$, which is bounded by $\frac{h^5}{5!} \sup |g^{(4)}|$ if $g^{(4)}$ is merely continuous (not necessarily differentiable). The theorem statement asserts a sharper $\mathcal{O}(h^6)$ in the final result, which we will see emerges from the cancellation of the fifth-order terms.
[/guided]
[/step]
[step:Form the second central difference and cancel the odd-order terms]
Adding the two expansions:
\begin{align*}
g(x + h) + g(x - h) &= 2g(x) + h^2 g''(x) + \frac{h^4}{12} g^{(4)}(x) + \mathcal{O}(h^6).
\end{align*}
The odd-order terms cancel: the $hg'(x)$ terms have opposite signs and sum to zero, and likewise the $\frac{h^3}{6}g'''(x)$ terms cancel. The even-order terms double: $\frac{h^2}{2}g''(x)$ appears twice, giving $h^2 g''(x)$, and $\frac{h^4}{24}g^{(4)}(x)$ appears twice, giving $\frac{h^4}{12}g^{(4)}(x)$.
Subtracting $2g(x)$ from both sides:
\begin{align*}
\Delta_h^* g(x) = g(x - h) - 2g(x) + g(x + h) = h^2 g''(x) + \frac{1}{12} h^4 g^{(4)}(x) + \mathcal{O}(h^6).
\end{align*}
[guided]
We now compute $g(x - h) - 2g(x) + g(x + h)$ by substituting the Taylor expansions. Rearranging:
\begin{align*}
g(x + h) + g(x - h) &= \bigl[g(x) + hg'(x) + \tfrac{h^2}{2}g''(x) + \tfrac{h^3}{6}g'''(x) + \tfrac{h^4}{24}g^{(4)}(x) + \mathcal{O}(h^5)\bigr] \\
&\quad + \bigl[g(x) - hg'(x) + \tfrac{h^2}{2}g''(x) - \tfrac{h^3}{6}g'''(x) + \tfrac{h^4}{24}g^{(4)}(x) + \mathcal{O}(h^5)\bigr].
\end{align*}
Collecting term by term:
- **Order $h^0$:** $g(x) + g(x) = 2g(x)$.
- **Order $h^1$:** $hg'(x) + (-h)g'(x) = 0$. (Cancellation.)
- **Order $h^2$:** $\frac{h^2}{2}g''(x) + \frac{h^2}{2}g''(x) = h^2 g''(x)$.
- **Order $h^3$:** $\frac{h^3}{6}g'''(x) + (-\frac{h^3}{6})g'''(x) = 0$. (Cancellation.)
- **Order $h^4$:** $\frac{h^4}{24}g^{(4)}(x) + \frac{h^4}{24}g^{(4)}(x) = \frac{h^4}{12}g^{(4)}(x)$.
- **Order $h^5$ and above:** The two $\mathcal{O}(h^5)$ remainders need not cancel individually. However, the fifth-order terms in the full Taylor expansion (which involve $g^{(5)}$ if it exists, or are absorbed into the remainder) also have opposite signs and cancel, leaving the leading remainder at order $h^6$.
Why does the remainder improve to $\mathcal{O}(h^6)$ rather than $\mathcal{O}(h^5)$? The second central difference is a symmetric linear combination of $g$ at symmetric points $x \pm h$. Any such symmetric combination annihilates all odd-order Taylor terms. The $h^5$ term would involve $g^{(5)}(x)$ multiplied by $\frac{h^5}{120} - \frac{h^5}{120} = 0$, so the first surviving remainder term is at order $h^6$.
Subtracting $2g(x)$ gives the stated identity:
\begin{align*}
\Delta_h^* g(x) = g(x - h) - 2g(x) + g(x + h) = h^2 g''(x) + \frac{1}{12}h^4 g^{(4)}(x) + \mathcal{O}(h^6).
\end{align*}
This result reveals that the second central difference $\Delta_h^* g(x) / h^2$ approximates $g''(x)$ with an error of order $h^2$, making it a second-order accurate finite difference approximation to the second derivative. The $\frac{1}{12}h^4 g^{(4)}(x)$ term is the leading truncation error.
[/guided]
[/step]