6.4 Hermite interpolation

If derivatives are known as well as values, a polynomial can match both. The Hermite polynomial \(H_{2n+1}\) of degree at most \(2n+1\) satisfies \(H(x_i) = f(x_i)\) and \(H'(x_i) = f'(x_i)\) at \(n+1\) distinct nodes.

Theorem 6.4.1. If \(f\in C^1[a,b]\) and \(x_0,\dots ,x_n\in [a,b]\) are distinct, there is a unique polynomial of degree at most \(2n+1\) agreeing with \(f\) and \(f'\) at every node. If \(f\in C^{2n+2}[a,b]\), its error is \[f(x)-H_{2n+1}(x) = \frac {f^{(2n+2)}(\xi (x))}{(2n+2)!}(x-x_0)^2\cdots (x-x_n)^2 .\]

The proof of the error formula repeats that of Theorem 6.1.3 with \(g(t) = f(t)-H(t)-(f(x)-H(x))\prod \frac {(t-x_i)^2}{(x-x_i)^2}\), which has double zeros at the nodes. The easiest way to construct \(H\) is by divided differences with each node repeated: set \(z_{2i} = z_{2i+1} = x_i\), and wherever a first divided difference would divide by zero, use the derivative instead, \[f[z_{2i},z_{2i+1}] = f'(x_i),\] which is the limit of \(f[x_i,x_i+\delta ]\) as \(\delta \to 0\) and agrees with (6.1). Then Newton’s formula on \(z_0,\dots ,z_{2n+1}\) gives \(H_{2n+1}\).

Example 6.4.2. Using \(f\) and \(f' = -J_1\) at \(1.3\), \(1.6\), \(1.9\),

\(x\) \(1.3\) \(1.6\) \(1.9\)
\(f(x)\) \(0.6200860\) \(0.4554022\) \(0.2818186\)
\(f'(x)\) \(-0.5220232\) \(-0.5698959\) \(-0.5811571\)

find the Hermite polynomial \(H_5\) and approximate \(f(1.5)\).

Solution. With the repeated nodes \(z_0,\dots ,z_5 = 1.3, 1.3, 1.6, 1.6, 1.9, 1.9\) (one row each) the divided-difference table is

\(f[z]\) 1st 2nd 3rd 4th 5th
\(0.620086\)
\(0.620086\) \(-0.522023\)
\(0.455402\) \(-0.548946\) \(-0.089743\)
\(0.455402\) \(-0.569896\) \(-0.069833\) \(0.066366\)
\(0.281819\) \(-0.578612\) \(-0.029054\) \(0.067966\) \(0.002667\)
\(0.281819\) \(-0.581157\) \(-0.008484\) \(0.068567\) \(0.001002\) \(-0.002775\)

The entries \(-0.522023\), \(-0.569896\), \(-0.581157\) in the first column are the given derivatives. Newton’s formula gives \begin {align*} H_5(x) &= 0.6200860-0.5220232(x-1.3)-0.0897427(x-1.3)^2+0.0663656(x-1.3)^2(x-1.6)\\ &\quad +0.0026667(x-1.3)^2(x-1.6)^2\\ &\quad -0.0027747(x-1.3)^2(x-1.6)^2(x-1.9), \end {align*}

and \(H_5(1.5) = 0.5118277\), correct to all seven digits: three values and three slopes do better than five values.

Questions on this section

Stuck on something here? Ask below and it stays attached to this topic.