MathIsimple
SC-02
Course 2

Polynomial Interpolation

Learn how to construct polynomials that pass through given data points. Master Lagrange and Newton interpolation methods, understand error bounds, and explore Hermite interpolation for matching derivatives.

Learning Objectives
  • Understand the polynomial interpolation problem and uniqueness theorem
  • Construct Lagrange interpolating polynomials using basis functions
  • Apply Newton's divided difference method for efficient computation
  • Analyze interpolation error using the error formula
  • Implement Hermite interpolation for derivative matching
  • Compare different interpolation methods and their applications

1. The Interpolation Problem

Given a set of data points, we want to find a polynomial that passes through all of them. This is fundamental to many numerical methods including integration and differentiation.

Definition 2.1: Polynomial Interpolation Problem

Given n+1n + 1 distinct points x0,x1,,xnx_0, x_1, \ldots, x_n (called interpolation nodes) and corresponding function values yi=f(xi)y_i = f(x_i) for i=0,1,,ni = 0, 1, \ldots, n, find a polynomial Pn(x)P_n(x) of degree at most nn such that:

Pn(xi)=yi,i=0,1,,nP_n(x_i) = y_i, \quad i = 0, 1, \ldots, n

Theorem 2.1: Existence and Uniqueness

The interpolation polynomial Pn(x)P_n(x) satisfying Pn(xi)=yiP_n(x_i) = y_i fori=0,1,,ni = 0, 1, \ldots, n exists and is unique.

Remark:

The uniqueness means that while there are different ways to construct the interpolating polynomial (Lagrange form, Newton form, etc.), they all give the same polynomial.

2. Lagrange Interpolation

Definition 2.2: Lagrange Basis Polynomials

The Lagrange basis polynomials li(x)l_i(x) for i=0,1,,ni = 0, 1, \ldots, n are defined as:

li(x)=j=0,jinxxjxixj=(xx0)(xxi1)(xxi+1)(xxn)(xix0)(xixi1)(xixi+1)(xixn)l_i(x) = \prod_{j=0, j \neq i}^{n} \frac{x - x_j}{x_i - x_j} = \frac{(x - x_0) \cdots (x - x_{i-1})(x - x_{i+1}) \cdots (x - x_n)}{(x_i - x_0) \cdots (x_i - x_{i-1})(x_i - x_{i+1}) \cdots (x_i - x_n)}

Each li(x)l_i(x) is a polynomial of degree nn satisfying li(xj)=δijl_i(x_j) = \delta_{ij} (Kronecker delta).

Definition 2.3: Lagrange Interpolating Polynomial

The Lagrange interpolating polynomial is:

Pn(x)=i=0nyili(x)=y0l0(x)+y1l1(x)++ynln(x)P_n(x) = \sum_{i=0}^{n} y_i \, l_i(x) = y_0 l_0(x) + y_1 l_1(x) + \cdots + y_n l_n(x)

Example: Lagrange Interpolation with 3 Points

Problem: Find the interpolating polynomial for (0,1),(1,3),(2,7)(0, 1), (1, 3), (2, 7).

Solution:

First, compute the basis polynomials:

l0(x)=(x1)(x2)(01)(02)=(x1)(x2)2l_0(x) = \frac{(x-1)(x-2)}{(0-1)(0-2)} = \frac{(x-1)(x-2)}{2}
l1(x)=(x0)(x2)(10)(12)=x(x2)1=x(x2)l_1(x) = \frac{(x-0)(x-2)}{(1-0)(1-2)} = \frac{x(x-2)}{-1} = -x(x-2)
l2(x)=(x0)(x1)(20)(21)=x(x1)2l_2(x) = \frac{(x-0)(x-1)}{(2-0)(2-1)} = \frac{x(x-1)}{2}

Then:

P2(x)=1l0(x)+3l1(x)+7l2(x)=x2+x+1P_2(x) = 1 \cdot l_0(x) + 3 \cdot l_1(x) + 7 \cdot l_2(x) = x^2 + x + 1

Theorem 2.2: Interpolation Error

Let x0,x1,,xnx_0, x_1, \ldots, x_n be n+1n+1 distinct points in [a,b][a, b], and let fCn+1[a,b]f \in C^{n+1}[a, b]. If Pn(x)P_n(x) is the interpolating polynomial, then for each x[a,b]x \in [a, b], there exists ξ(a,b)\xi \in (a, b) such that:

f(x)Pn(x)=f(n+1)(ξ)(n+1)!ωn+1(x)f(x) - P_n(x) = \frac{f^{(n+1)}(\xi)}{(n+1)!} \omega_{n+1}(x)

where ωn+1(x)=(xx0)(xx1)(xxn)\omega_{n+1}(x) = (x - x_0)(x - x_1) \cdots (x - x_n).

Note:

The error depends on both the (n+1)(n+1)-th derivative of ff and the productωn+1(x)\omega_{n+1}(x). Choosing good interpolation nodes can minimize maxωn+1(x)\max|\omega_{n+1}(x)|.

3. Newton's Divided Differences

Newton's method provides an alternative form that makes it easy to add new data points without recomputing the entire polynomial.

Definition 2.4: Divided Differences

The divided differences are defined recursively:

Zeroth order: f[xi]=f(xi)f[x_i] = f(x_i)

First order: f[xi,xi+1]=f[xi+1]f[xi]xi+1xif[x_i, x_{i+1}] = \frac{f[x_{i+1}] - f[x_i]}{x_{i+1} - x_i}

k-th order:

f[x0,x1,,xk]=f[x1,x2,,xk]f[x0,x1,,xk1]xkx0f[x_0, x_1, \ldots, x_k] = \frac{f[x_1, x_2, \ldots, x_k] - f[x_0, x_1, \ldots, x_{k-1}]}{x_k - x_0}
Remark:

Divided differences are symmetric: the value of f[x0,x1,,xk]f[x_0, x_1, \ldots, x_k]does not depend on the order of the nodes.

Definition 2.5: Newton's Interpolating Polynomial

The Newton form of the interpolating polynomial is:

Pn(x)=f[x0]+f[x0,x1](xx0)+f[x0,x1,x2](xx0)(xx1)+P_n(x) = f[x_0] + f[x_0, x_1](x - x_0) + f[x_0, x_1, x_2](x - x_0)(x - x_1) + \cdots
+f[x0,x1,,xn](xx0)(xx1)(xxn1)+ \, f[x_0, x_1, \ldots, x_n](x - x_0)(x - x_1) \cdots (x - x_{n-1})

Example: Divided Difference Table

For data points (0,1),(1,3),(2,7),(3,13)(0, 1), (1, 3), (2, 7), (3, 13):

xix_if[xi]f[x_i]1st diff2nd diff3rd diff
01
132
2741
313610

Newton polynomial: P3(x)=1+2x+1x(x1)+0=x2+x+1P_3(x) = 1 + 2x + 1 \cdot x(x-1) + 0 = x^2 + x + 1

Theorem 2.3: Divided Difference and Derivatives

If fCn[a,b]f \in C^n[a, b], then there exists ξ(a,b)\xi \in (a, b) such that:

f[x0,x1,,xn]=f(n)(ξ)n!f[x_0, x_1, \ldots, x_n] = \frac{f^{(n)}(\xi)}{n!}

4. Hermite Interpolation

Hermite interpolation extends polynomial interpolation by also matching derivative values at the interpolation nodes, resulting in higher accuracy.

Definition 2.6: Hermite Interpolation Problem

Given nodes x0,x1,,xnx_0, x_1, \ldots, x_n with function values f(xi)f(x_i) and derivative values f(xi)f'(x_i), find a polynomial H2n+1(x)H_{2n+1}(x) of degree at most 2n+12n+1 such that:

H2n+1(xi)=f(xi),H2n+1(xi)=f(xi),i=0,1,,nH_{2n+1}(x_i) = f(x_i), \quad H'_{2n+1}(x_i) = f'(x_i), \quad i = 0, 1, \ldots, n

Definition 2.7: Two-Point Cubic Hermite Interpolation

For two points x0,x1x_0, x_1, the cubic Hermite polynomial uses basis functions:

h0(x)=(1+2xx0x1x0)(xx1x0x1)2h_0(x) = \left(1 + 2\frac{x - x_0}{x_1 - x_0}\right)\left(\frac{x - x_1}{x_0 - x_1}\right)^2
h1(x)=(1+2xx1x0x1)(xx0x1x0)2h_1(x) = \left(1 + 2\frac{x - x_1}{x_0 - x_1}\right)\left(\frac{x - x_0}{x_1 - x_0}\right)^2
H0(x)=(xx0)(xx1x0x1)2,H1(x)=(xx1)(xx0x1x0)2H_0(x) = (x - x_0)\left(\frac{x - x_1}{x_0 - x_1}\right)^2, \quad H_1(x) = (x - x_1)\left(\frac{x - x_0}{x_1 - x_0}\right)^2

The Hermite polynomial is:

H(x)=f(x0)h0(x)+f(x1)h1(x)+f(x0)H0(x)+f(x1)H1(x)H(x) = f(x_0)h_0(x) + f(x_1)h_1(x) + f'(x_0)H_0(x) + f'(x_1)H_1(x)

Theorem 2.4: Hermite Interpolation Error

If fC2n+2[a,b]f \in C^{2n+2}[a, b], then for the Hermite interpolating polynomialH2n+1(x)H_{2n+1}(x), there exists ξ(a,b)\xi \in (a, b) such that:

f(x)H2n+1(x)=f(2n+2)(ξ)(2n+2)!ωn+12(x)f(x) - H_{2n+1}(x) = \frac{f^{(2n+2)}(\xi)}{(2n+2)!} \omega_{n+1}^2(x)

where ωn+1(x)=(xx0)(xx1)(xxn)\omega_{n+1}(x) = (x - x_0)(x - x_1) \cdots (x - x_n).

Note:

The error for Hermite interpolation involves ωn+12(x)\omega_{n+1}^2(x) rather thanωn+1(x)\omega_{n+1}(x), giving faster convergence as the nodes become denser.

5. Comparison and Applications

Lagrange Form

  • Conceptually simple and elegant
  • All basis polynomials must be recomputed when adding points
  • Good for theoretical analysis

Newton Form

  • Efficient for adding new data points
  • Can be evaluated efficiently using Horner's method
  • Divided difference table provides insight into data behavior

Hermite Interpolation

  • Higher accuracy when derivative information is available
  • Smoother interpolant (matching slopes)
  • Foundation for spline interpolation
Remark:

Warning: Runge's Phenomenon

High-degree polynomial interpolation with equally-spaced nodes can lead to large oscillations near the boundaries. This is called Runge's phenomenon. Solutions include using Chebyshev nodes or piecewise interpolation (splines).

Practice Quiz

Polynomial Interpolation Quiz
10
Questions
0
Correct
0%
Accuracy
1
Given data points (0,1),(1,3),(2,7)(0, 1), (1, 3), (2, 7), what is the Lagrange interpolating polynomial?
Easy
Not attempted
2
What is the divided difference f[x0,x1]f[x_0, x_1] for f(x)=x2f(x) = x^2 with x0=1,x1=3x_0 = 1, x_1 = 3?
Easy
Not attempted
3
How many data points are needed to uniquely determine a polynomial of degree nn?
Easy
Not attempted
4
The Lagrange basis polynomial li(x)l_i(x) satisfies li(xj)=l_i(x_j) =
Medium
Not attempted
5
For f(x)Cn+1[a,b]f(x) \in C^{n+1}[a,b], the interpolation error f(x)Pn(x)f(x) - P_n(x) is proportional to:
Medium
Not attempted
6
What is the key advantage of Newton's divided difference form over Lagrange form?
Medium
Not attempted
7
Hermite interpolation uses which additional information at each node?
Medium
Not attempted
8
For two-point cubic Hermite interpolation with x0,x1x_0, x_1, the interpolating polynomial has degree at most:
Hard
Not attempted
9
The divided difference f[x0,x1,,xn]f[x_0, x_1, \ldots, x_n] equals f(n)(ξ)n!\frac{f^{(n)}(\xi)}{n!} for some ξ\xi in the interval when:
Hard
Not attempted
10
The interpolation error for Hermite interpolation with n+1n+1 nodes is O(h2n+2)O(h^{2n+2}) because:
Hard
Not attempted

Frequently Asked Questions

What's the difference between Lagrange and Newton interpolation?

Both produce the same polynomial, but in different forms. Lagrange formexpresses the polynomial as a weighted sum of basis polynomials. Newton formuses divided differences and nested products.

Newton's form is more efficient when adding new data points, as only one new term needs to be computed.

How do I choose interpolation nodes to minimize error?

The error depends on ωn+1(x)=(xxi)\omega_{n+1}(x) = \prod(x - x_i). To minimize its maximum value on [1,1][-1, 1], use Chebyshev nodes:

xk=cos(2k+12n+2π),k=0,1,,nx_k = \cos\left(\frac{2k + 1}{2n + 2}\pi\right), \quad k = 0, 1, \ldots, n

When should I use Hermite interpolation instead of Lagrange?

Use Hermite interpolation when you have reliable derivative information at the data points. This often occurs in physics simulations where both position and velocity are known. Hermite interpolation provides smoother curves and higher accuracy with fewer points.

What is Runge's phenomenon and how can I avoid it?

Runge's phenomenon refers to oscillations that appear near the boundaries when using high-degree polynomial interpolation with equally-spaced nodes.

To avoid it:

  • Use Chebyshev nodes instead of equally-spaced nodes
  • Use piecewise polynomial interpolation (splines)
  • Keep the polynomial degree low

How do divided differences relate to derivatives?

For a function fCnf \in C^n, the n-th divided differencef[x0,,xn]f[x_0, \ldots, x_n] equals f(n)(ξ)/n!f^{(n)}(\xi)/n! for someξ\xi in the interval. This connection is useful for error analysis and shows that divided differences approximate scaled derivatives.