logo

Polynomial Interpolation 📂Numerical Analysis

Polynomial Interpolation

Definition 1

For different x0,,xnx_{0} , \cdots , x_{n} data (x0,y0),,(xn,yn)(x_{0}, y_{0}) , \cdots , (x_{n} , y_{n}), a polynomial function pp that satisfies p(xi)=yip (x_{i} ) = y_{i} and degpn\deg p \le n is called Polynomial Interpolation.

Theorem

Existence and Uniqueness

  • [1]: For the given data, there exists a unique pp.

Lagrange’s Formula

  • [2]: pn(x)=i=0nyili(X)p_{n} (x) = \sum_{i=0}^{n} y_{i} l_{i} (X)

Newton’s Divided Difference Formula

  • [3]: pn(x)=f(x0)+i=1nf[x0,,xi]j=0i1(xxj)p_{n} (x) = f(x_{0}) + \sum_{i=1}^{n} f [ x_{0} , \cdots , x_{i} ] \prod_{j=0}^{i-1} (x - x_{j} )

Error Analysis

  • [4]: For a (n+1)(n+1) times differentiable function f:RRf : \mathbb{R} \to \mathbb{R} and some ξH{x0,,xn}\xi \in \mathscr{H} \left\{ x_{0} , \cdots , x_{n} \right\}, the polynomial interpolation pnp_{n} of ff satisfies the following for some tRt \in \mathbb{R}. f(t)pn(t)=(tx0)(txn)(n+1)!f(n+1)(ξ)\displaystyle f(t) - p_{n} (t) = {{ (t - x_{0}) \cdots (t - x_{n}) } \over { (n+1)! }} f^{(n+1)} ( \xi )

  • H{a,b,c,}\mathscr{H} \left\{ a,b,c, \cdots \right\} represents the smallest interval that includes a,b,c,a,b,c, \cdots.

Explanation

Polynomial interpolation is simplified in Korean as 다항식 보간법.

Condition degpn\deg p \le n

20190403\_105653.png

The condition degpn\deg p \le n implies there’s not always a guarantee that a pp satisfying degp=n\deg p = n exists. For instance, when n=2n=2, if the three points lie in a straight line as shown above, a p2(x)=a2x2+a1x+a0p_{2} (x) = a_{2} x^{2} + a_{1} x + a_{0} passing through (n+1)=3(n+1)=3 points does not exist, while a lower degree p1(x)=a1x+a0p_{1} (x) = a_{1} x + a_{0} does. This actually means that p2(x)=a2x2+a1x+a0p_{2} (x) = a_{2} x^{2} + a_{1} x + a_{0} was found, but in cases where a2=0a_{2} = 0.

Lagrange’s Formula and Newton’s Divided Difference Formula are the same

Though formulas [2] and [3] appear different, they are essentially the same due to [1]. The core difference between the two formulas is merely how pnp_{n} is represented. Functionally, the significant difference is that Newton’s Divided Difference Formula is easier to update when new data is added.

Error with the Actual Function

Theorem [4] shows how much difference there is between the interpolating pnp_{n} and the actual function ff. Generally, the divergence rate of (n+1)!(n+1)! is very fast, so the accuracy of interpolation pnp_{n} increases with more data. However, this formula does not necessarily discuss convergence. For a simple example, consider when tt is very, very far from H{x0,,xn}\mathscr{H} \left\{ x_{0} , \cdots , x_{n} \right\}. Moreover, if the value of ff worsens with each differentiation, and that even surpasses the divergence rate of (n+1)!(n+1)!, it can turn weird.

Proof

[1]

Strategy: Show the uniqueness of the coefficients a0,a1,,ana_{0} , a_{1} , \cdots , a_{n} of pnp_{n} that satisfy yi=pn(xi)=a0+a1xi++anxiny_{i} = p_{n} (x_{i}) = a_{0} + a_{1} x_{i} + \cdots + a_{n} x_{i}^{n} for all i=0,,ni = 0, \cdots , n by representing a system of (n+1)(n+1) equations in matrix form and simultaneously ensuring the existence and uniqueness of the inverse matrix.


Define y:=[y0y1yn],X:=[1x0x0n1x1x1n1xnxnn],a:=[a0a1an] \mathbf{y} := \begin{bmatrix} y_{0} \\ y_{1} \\ \vdots \\ y_{n} \end{bmatrix}, X := \begin{bmatrix} 1 & x_{0} & \cdots & x_{0}^{n} \\ 1 & x_{1} & \cdots & x_{1}^{n} \\ \vdots & \vdots & \ddots & \vdots \\ 1 & x_{n} & \cdots & x_{n}^{n} \end{bmatrix} , \mathbf{a} := \begin{bmatrix} a_{0} \\ a_{1} \\ \vdots \\ a_{n} \end{bmatrix} and represent the simultaneous equations in matrix form, and then [y0y1yn]=[1x0x0n1x1x1n1xnxnn][a0a1an] \begin{bmatrix} y_{0} \\ y_{1} \\ \vdots \\ y_{n} \end{bmatrix} = \begin{bmatrix} 1 & x_{0} & \cdots & x_{0}^{n} \\ 1 & x_{1} & \cdots & x_{1}^{n} \\ \vdots & \vdots & \ddots & \vdots \\ 1 & x_{n} & \cdots & x_{n}^{n} \end{bmatrix} \begin{bmatrix} a_{0} \\ a_{1} \\ \vdots \\ a_{n} \end{bmatrix} Now, the problem has changed to finding a solution a\mathbf{a} that satisfies y=Xa\mathbf{y} = X \mathbf{a}.

Vandermonde matrix determinant: The determinant of XX is detX=1i<jn(xjxi)\displaystyle \det X = \prod_{1 \le i < j \le n } (x_{j} - x_{i})

Since the x0,,xnx_{0} , \cdots , x_{n} are different by assumption, detX0\det X \ne 0, and X1X^{-1} exists. Thus, a=X1y\mathbf{a} = X^{-1} \mathbf{y} also exists. Meanwhile, since the inverse of a given matrix is unique, a\mathbf{a} is also unique.

[2]

Seen through the Kronecker delta function.

[3]

Calculated honestly using the divided differences.

[4]

Strategy: Define new dummy functions and avoid direct calculation by using their differentiability. Since the setting is complex, it is actually easier to understand from the back.


Claim: For E(x):=f(x)pn(X)E (x) := f(x) - p_{n} (X), the following holds. E(t)=(tx0)(txn)(n+1)!f(n+1)(ξ) E(t) = {{ (t - x_{0}) \cdots (t - x_{n}) } \over { (n+1)! }} f^{(n+1)} ( \xi )


Part 1.

Firstly, if tt is the same as the nodal points x0,,xnx_{0} , \cdots , x_{n}, it trivially holds, so assume tt is different from these nodal points. Ψ(x):=(xx0)(xx1)(xxn)G(x):=E(x)Ψ(x)Ψ(t)E(t) \begin{align*} \Psi (x) :=& (x - x_{0} ) (x - x_{1}) \cdots (x - x_{n}) \\ G (x) :=& E(x) - {{ \Psi (x) } \over { \Psi (t) }} E(t) \end{align*} Upon defining the new functions as above, since ff, pnp_{n}, and Ψ\Psi are (n+1)(n+1) times differentiable, GG is also (n+1)(n+1) times differentiable.


Part 2.

Substituting x=xix = x_{i} into GG leads to E(xi)=f(xi)pn(xi)=0E(x_{i}) = f(x_{i}) - p_{n} (x_{i}) = 0 and Ψ(xi)=0\Psi (x_{i} ) = 0, thus G(xi)=E(xi)Ψ(xi)Ψ(t)E(t)=0 G(x_{i}) = E(x_{i} ) - {{ \Psi (x_{i}) } \over { \Psi (t) }} E(t) = 0 Substituting x=tx = t into GG leads to Ψ(t)Ψ(t)=1\displaystyle {{ \Psi (t) } \over { \Psi (t) }} = 1, thus G(t)=E(t)E(t)=0 G(t) = E(t) - E(t) =0 Therefore, GG has (n+2)(n+2) different zero x0,,xn,tx_{0} , \cdots , x_{n} , ts.


Part 3.

For convenience, let’s say xn+1:=tx_{n+1} :=t.

Rolle’s theorem: If function f(x)f(x) is continuous on [a,b][a,b], differentiable on (a,b)(a,b), and f(a)=f(b)f(a)=f(b), then there exists at least one cc in (a,b)(a,b) that satisfies f(c)=0f ' (c)=0.

For all i=0,,ni=0, \cdots , n, G(xi)=0=G(xi+1) G(x_{i}) = 0 = G(x_{i+1}) hence, by Rolle’s theorem, there exists xiH{xi,xi+1}x'_{i} \in \mathscr{H} \left\{ x_{i} , x_{i+1} \right\} satisfying g(xi)=0g ' ( x’_{i}) = 0, and similarly for all i=0,,(n1)i=0, \cdots , (n-1), g(xi)=0=g(xi+1) g ' (x’_{i}) = 0 = g ' (x’_{i+1}) hence, by Rolle’s theorem, there exists xiH{xi,xi+1}x''_{i} \in \mathscr{H} \left\{ x’_{i} , x’_{i+1} \right\} satisfying G(xi)=0G''( x’’_{i}) = 0. By inductively using Rolle’s theorem (n+1)(n+1) times, it can be guaranteed that there exists ξH{x0,,xn+1}\xi \in \mathscr{H} \left\{ x_{0} , \cdots , x_{n+1} \right\} satisfying G(n+1)(ξ)=0 G^{(n+1)} ( \xi ) = 0

Meanwhile, since pnp_{n} is a nn degree polynomial, E(n+1)(x)=f(n+1)(x) E^{(n+1)} (x) = f^{(n+1)} ( x) The highest degree term of Ψ\Psi is xn+1x^{n+1}, so Ψ(n+1)(x)=(n+1)! \Psi^{(n+1)} (x) = (n+1)! Differentiating both sides of G(x)=E(x)Ψ(x)Ψ(t)E(t)\displaystyle G (x) = E(x) - {{ \Psi (x) } \over { \Psi (t) }} E(t) (n+1)(n+1) times with respect to xx gives G(n+1)(x)=f(n+1)(x)(n+1)!Ψ(t)E(t) G^{(n+1)} (x) = f^{(n+1)} ( x) - {{ (n+1)! } \over { \Psi (t) }} E(t) Substituting x=ξx=\xi into G(n+1)G^{(n+1)} and f(n+1)f^{(n+1)} yields 0=f(n+1)(ξ)(n+1)!Ψ(t)E(t) 0 = f^{(n+1)} ( \xi ) - {{ (n+1)! } \over { \Psi (t) }} E(t) Since E(t)=f(t)pn(t)E (t) = f(t) - p_{n} (t), it follows that f(t)j=0nf(xj)lj(t)=(tx0)(txn)(n+1)!f(n+1)(ξ) f(t) - \sum_{j=0}^{n} f( x_{j} ) l_{j} (t) = {{ (t - x_{0}) \cdots (t - x_{n}) } \over { (n+1)! }} f^{(n+1)} ( \xi )


  1. Atkinson. (1989). An Introduction to Numerical Analysis(2nd Edition): p131. ↩︎