Interpolation

A method of constructing new data points within the range of a discrete set of known data points. The constructed function passes through all given points.

Weierstrass Approximation Theorem

Suppose ff is continuous on [a,b][a,b]. Then ∀ϵ>0\forall \epsilon > 0, ∃\exists a polynomial P(x)P(x) such that ∀x∈[a,b]\forall x \in [a,b]:

∣f(x)−P(x)∣<ϵ\left\lvert f(x) - P(x) \right\rvert < \epsilon

Types

Linear Interpolation

Fits a straight line between 2 adjacent data points (x0,y0)(x_0, y_0) and (x1,y1)(x_1, y_1):

P(x)=y0+y1−y0x1−x0(x−x0)P(x) = y_0 + \frac{y_1 - y_0}{x_1 - x_0}(x - x_0)

Simple but only accurate when the underlying function is nearly linear between nodes.

Polynomial Interpolation

Fits a single polynomial of degree nn through n+1n + 1 data points. Methods include Lagrange and Newton’s divided differences.

High-degree polynomials can oscillate wildly near the endpoints (Runge’s phenomenon).

Spline Interpolation

Fits piecewise polynomials between consecutive data points, joined smoothly at knots. Cubic splines are most common: each piece is degree 3 and the join points satisfy C2C^2 continuity (matching function value, first derivative, and second derivative).

Avoids Runge’s phenomenon while remaining smooth.

Wolfram Mathematica notebook

The summary notebook defines every function used in this module, with documentation and no examples, as a starting point for your own problems.

Written by October 7, 2026 1 min read
Was this helpful?