Understanding Lagrange Interpolation and Numerical Instability

Vitality Learning
5 min readSep 21, 2024
Photo by Joshua Sortino on Unsplash

Interpolation is a key concept in numerical analysis, allowing us to approximate a function at points where it hasn’t been explicitly sampled. One of the most commonly used interpolation techniques is Lagrange interpolation, which expresses the approximating polynomial in terms of Lagrange basis polynomials.

This post will delve into the theory of Lagrange interpolation, explore the issue of numerical instability with increasing polynomial degree, and demonstrate how these concepts can be illustrated through code.

The Theory of Lagrange Interpolation

Given a set of points x0, x1, …, xn​ and corresponding function values f(x0), f(x1), …, f(xn), we wish to find a polynomial P(x) of degree n that interpolates the function at these points, i.e.,

The Lagrange form of the interpolating polynomial is:

where ℓj(x) is the Lagrange basis polynomial defined as:

Each ℓj(x) is constructed so that it equals 1 at xj​ and 0 at all other interpolation points, ensuring that the polynomial passes exactly through the given points.

Polynomial Interpolation and the Vandermonde Matrix

--

--

Vitality Learning

We are teaching, researching and consulting parallel programming on Graphics Processing Units (GPUs) since the delivery of CUDA. We also play Matlab and Python.