Skip to article frontmatterSkip to article content

6.8Hermite interpolation

6.8.1Using derivatives

So far we have developed approximation methods which make use of function values only. Sometimes, the derivative information may also be available. Methods which make use of derivatives also to construct the approximation are known are Hermite approximations. Here we will look at interpolating given function and derivative information.

6.8.2Lagrange form of interpolation

Given (xi,yi,yi)(x_i,y_i,y_i'), i=0,1,2,,Ni=0,1,2,\ldots,N, find a polynomial p(x)p(x) such that

p(xi)=yi=f(xi),p(xi)=yi=f(xi),i=0,1,2,,Np(x_i) = y_i = f(x_i), \qquad p'(x_i) = y_i' = f'(x_i), \qquad i=0,1,2,\ldots,N

There are 2N+22N+2 conditions given so we can try to find a polynomial of degree 2N+12N+1 that interpolates the given data.

Define

(x)=(xx0)(xxN)\ell(x) = (x-x_0)\ldots(x-x_N)

then the Lagrange polynomials are

i(x)=j=0,jiNxxjxixj=(x)(xxi)(xi)\ell_i(x) = \prod_{j=0, j \ne i}^N \frac{x-x_j}{x_i - x_j} = \frac{\ell(x)}{(x-x_i) \ell'(x_i)}

Define

ri(x)=[12i(xi)(xxi)][i(x)]2si(x)=(xxi)[i(x)]2\begin{aligned} r_i(x) &= [1 - 2\ell_i'(x_i)(x-x_i)][\ell_i(x)]^2\\ s_i(x) &= (x-x_i) [\ell_i(x)]^2 \end{aligned}

Since iPN\ell_i \in \poly_N both rir_i, sis_i are in P2N+1\poly_{2N+1}. Since i(xj)=δij\ell_i(x_j) = \delta_{ij}, we have

ri(xj)=δij,si(xj)=0ri(xj)=0,si(xj)=δij\begin{align} r_i(x_j) &= \delta_{ij}, \qquad & s_i(x_j) &= 0 \\ r_i'(x_j) &= 0, \qquad & s_i'(x_j) &= \delta_{ij} \end{align}

Then the interpolating polynomial is given by

HN(x)=i=0Nyiri(x)+i=0Nyisi(x)H_N(x) = \sum_{i=0}^N y_i r_i(x) + \sum_{i=0}^N y_i' s_i(x)

6.8.2.1Uniqueness

Suppose there are two polynomials H(x),G(x)P2N+1H(x), G(x) \in \poly_{2N+1} that interpolate the same set of data. Then define

R(x)=H(x)G(x)P2N+1R(x) = H(x) - G(x) \in \poly_{2N+1}

and

R(xi)=R(xi)=0,i=0,1,,NR(x_i) = R'(x_i) = 0, \qquad i=0,1,\ldots,N

Thus R(x)R(x) has N+1N+1 double roots, hence atleast 2N+22N+2 roots, which implies that R(x)0R(x) \equiv 0.

6.8.3Newton form of interpolation

Even though the Newton form is not useful for computations, we show it now for general degree. The polynomial interpolating f(x)f(x) at nodes z0,,z2N+1z_0,\ldots,z_{2N+1} is

p2N+1(x)=f(z0)+(xz0)f[z0,z1]+(xz0)(xz1)f[z0,z1,z2]++(xz0)(xz2N)f[z0,,z2N+1]\begin{align} p_{2N+1}(x) &= f(z_0) \\ & \quad + (x-z_0)f[z_0,z_1] \\ & \quad + (x-z_0)(x - z_1) f[z_0,z_1,z_2] \\ & \quad + \ldots \\ & \quad + (x-z_0)\ldots(x- z_{2N})f[z_0,\ldots,z_{2N+1}] \end{align}

with error formula

f(x)p2N+1(x)=(xz0)(xz2N)(xz2N+1)f[z0,,z2N+1,x]f(x) - p_{2N+1}(x) = (x-z_0)\ldots(x-z_{2N})(x-z_{2N+1})f[z_0,\ldots,z_{2N+1},x]

We can let the nodes coincide and Newtons formula will still make sense.

z0,z1x0z2,z3x1z2N,z2N+1xN\begin{aligned} z_0, z_1 \to x_0 \\ z_2, z_3 \to x_1 \\ \vdots \qquad \\ z_{2N}, z_{2N+1} \to x_N \end{aligned}

which gives

p2N+1(x)=f(x0)+(xx0)f[x0,x0]+(xx0)2f[x0,x0,x1]++(xx0)2(xxN1)2(xxN)f[x0,x0,,xN,xN]\begin{align} p_{2N+1}(x) &= f(x_0) \\ & \quad + (x-x_0)f[x_0,x_0] \\ & \quad + (x-x_0)^2 f[x_0,x_0,x_1] \\ & \quad + \ldots \\ & \quad + (x-x_0)^2 \ldots(x-x_{N-1})^2 (x-x_N) f[x_0,x_0,\ldots,x_N,x_N] \end{align}

This is a polynomial of degree 2N+1\le 2N+1 with error formula

f(x)p2N+1(x)=(xx0)2(xxN)2f[x0,x0,,xN,xN,x]f(x) - p_{2N+1}(x) = (x-x_0)^2 \ldots (x-x_N)^2 f[x_0,x_0,\ldots,x_N,x_N,x]

6.8.3.1Claim: p2N+1=HNp_{2N+1} = H_N

Assume that fC2N+3f \in \cts^{2N+3}. Due to the Newton form, we have

p2N+1(xi)=f(xi),i=0,1,,Np_{2N+1}(x_i) = f(x_i), \qquad i=0,1,\ldots,N

Differentiating the error formula

f(x)p2N+1(x)= (xx0)2(xxN)2ddxf[x0,x0,,xN,xN,x]+f[x0,x0,,xN,xN,x]ddx[(xx0)2(xxN)2]= (xx0)2(xxN)2f[x0,x0,,xN,xN,x,x]+2f[x0,x0,,xN,xN,x]i=0N(xxi)j=0,jiN(xxj)2\begin{aligned} f'(x) - p_{2N+1}'(x) = \ & (x-x_0)^2 \ldots (x-x_N)^2 \dd{}{x} f[x_0,x_0,\ldots,x_N,x_N,x] \\ & + f[x_0,x_0,\ldots,x_N,x_N,x] \dd{}{x} [(x-x_0)^2 \ldots (x-x_N)^2] \\ = \ & (x-x_0)^2 \ldots (x-x_N)^2 f[x_0,x_0,\ldots,x_N,x_N,x,x] \\ & + 2 f[x_0,x_0,\ldots,x_N,x_N,x] \sum_{i=0}^N (x-x_i) \prod_{j=0,j \ne i}^N(x- x_j)^2 \end{aligned}

we see that

f(xi)p2N+1(xi)=0,i=0,1,,Nf'(x_i) - p_{2N+1}'(x_i) = 0, \qquad i=0,1,\ldots,N

We have degree p2N+12N+1p_{2N+1} \le 2N+1 and it satisfies the given data {xi,yi,yi}\{x_i,y_i,y_i'\}, i=0,1,,Ni=0,1,\ldots,N. By uniqueness of the Hermite interpolating polynomial, we have p2N+1=HNp_{2N+1} = H_N.