4. Interpolation I

Polynomial Interpolation

Polynomial Interpolation

students, imagine you are trying to draw a smooth curve through a set of measured points on a graph 📈. You may only know the value of a quantity at certain locations, but you want to estimate values in between. That is the core idea of polynomial interpolation. It is one of the most important tools in Numerical Analysis because it helps turn discrete data into a formula you can compute with.

Introduction: What interpolation means

Interpolation means finding a function that passes through given data points. In this lesson, the function is a polynomial. A polynomial is a sum of terms like $a_0 + a_1x + a_2x^2 + \cdots + a_nx^n$. Polynomial interpolation asks us to find a polynomial $P(x)$ such that

$$P(x_i) = y_i \quad \text{for each data point } (x_i, y_i).$$

If you know the values at a few points, a polynomial can fill in the gaps between them. This is useful in science, engineering, computer graphics, and data fitting. For example, if a thermometer gives temperatures only every hour, interpolation can estimate the temperature at 10:30. If a computer stores only a few sample points of a curve, interpolation can reconstruct a smooth approximation.

The main objectives of polynomial interpolation are to:

  • understand what interpolation is and why it matters,
  • learn the terminology used with data points and interpolating polynomials,
  • build and use interpolating polynomials from data,
  • connect this lesson to later methods such as the Lagrange form and Newton divided differences,
  • recognize how interpolation fits into the larger topic of Interpolation I.

The main idea and terminology

In polynomial interpolation, the given points are called nodes or data points. Suppose we have $n+1$ points:

$$\left(x_0, y_0\right), \left(x_1, y_1\right), \dots, \left(x_n, y_n\right),$$

where all $x_i$ values are distinct. Distinct means no two nodes have the same $x$-value. That matters because if two points shared the same $x$ but had different $y$ values, no function could pass through both at once.

The polynomial that passes through all these points is called the interpolating polynomial. If its degree is at most $n$, then it can match $n+1$ data points exactly. A key fact in Numerical Analysis is that for distinct nodes, there is exactly one polynomial of degree at most $n$ that fits all $n+1$ points.

Why exactly one? Think of it this way: if two different polynomials of degree at most $n$ both passed through the same $n+1$ points, their difference would be a polynomial of degree at most $n$ with $n+1$ roots. A nonzero polynomial of degree at most $n$ cannot have more than $n$ roots. So the difference must be the zero polynomial, which means the two polynomials are actually the same.

This uniqueness is powerful because it tells us that interpolation is not guesswork. Once the nodes are fixed, there is only one correct interpolating polynomial of that degree.

Building a polynomial from points

Let’s start with a small example. Suppose the data are

$$\left(0,1\right), \left(1,3\right), \left(2,2\right).$$

We want a polynomial of degree at most $2$ that passes through all three points. Since there are three points, a quadratic is enough in general. The polynomial might be written as

$$P(x) = ax^2 + bx + c.$$

To find $a$, $b$, and $c$, we substitute the three points into the formula:

$$P(0)=1, \quad P(1)=3, \quad P(2)=2.$$

This gives three equations in three unknowns. Solving them produces the unique polynomial.

This direct approach works for small problems, but it can become messy when there are many points. In practice, numerical methods use more organized formulas, especially the Lagrange form and Newton divided differences. These methods do not change the mathematical answer; they simply give more convenient ways to compute it.

A useful observation is that interpolation does not always mean a polynomial is the best model for all data. It means the polynomial matches the chosen points exactly. In some applications, exact matching is useful. In others, especially noisy data, fitting methods may be more appropriate than interpolation.

Why polynomial interpolation is useful

Polynomial interpolation is important because it lets us approximate unknown values from known samples. Suppose a weather station records rainfall at $x=0$, $x=2$, and $x=4$ hours, but you need an estimate at $x=3$. A polynomial through those points gives a value at $x=3$ without requiring a new measurement.

It also supports computation. A computer may store a complicated function only at a few points, then reconstruct a polynomial approximation for fast evaluation. In graphics, smooth curves can be built from control points. In numerical methods, interpolation helps approximate functions that are hard to evaluate directly.

However, there are limits. A polynomial can pass exactly through all the chosen data points, but that does not guarantee it behaves well everywhere between or outside them. Interpolation is meant to estimate inside the range of the data; outside that range, the process is called extrapolation, and errors can grow quickly.

Another important fact is that higher degree is not always better. Using many points can make the polynomial oscillate a lot, especially near the ends of the interval. So in Numerical Analysis, we care not only about matching the points, but also about stability and accuracy.

Connection to the Lagrange form

One of the most elegant ways to write the interpolating polynomial is the Lagrange form. students, even if you have not learned the full formula yet, the idea is simple: build the polynomial as a sum of pieces, where each piece is designed to be $1$ at one node and $0$ at the others.

For data points $\left(x_0,y_0\right), \dots, \left(x_n,y_n\right)$, the interpolating polynomial is

$$P(x) = \sum_{i=0}^{n} y_i L_i(x),$$

where each $L_i(x)$ is a Lagrange basis polynomial. These basis polynomials satisfy

$$L_i(x_j) = \begin{cases}1, & i=j,\\0, & i\ne j.\end{cases}$$

That property is exactly what makes the formula work. At the node $x_j$, all terms vanish except the $j$-th one, so $P(x_j)=y_j$.

Here is a simple example with three points. Suppose the points are $\left(0,1\right)$, $\left(1,3\right)$, and $\left(2,2\right)$. Then the basis polynomial for $x_0=0$ is

$$L_0(x)=\frac{(x-1)(x-2)}{(0-1)(0-2)}.$$

This expression is built so that $L_0(0)=1$, while $L_0(1)=0$ and $L_0(2)=0$. Similar formulas can be written for $L_1(x)$ and $L_2(x)$. Then the polynomial becomes

$$P(x)=1\cdot L_0(x)+3\cdot L_1(x)+2\cdot L_2(x).$$

The Lagrange form is especially good for understanding the structure of interpolation because it shows how each data value contributes separately.

Connection to Newton divided differences

Another major way to represent the interpolating polynomial is the Newton form, which uses divided differences. This method is very useful when new data points are added, because the polynomial can be updated efficiently.

The Newton form looks like

$$P(x)=a_0+a_1(x-x_0)+a_2(x-x_0)(x-x_1)+\cdots+a_n(x-x_0)(x-x_1)\cdots(x-x_{n-1}).$$

The coefficients $a_0, a_1, \dots, a_n$ come from divided differences. These values are computed from the data in a table. The first coefficient is simply

$$a_0 = y_0,$$

and the next one is

$$a_1 = \frac{y_1-y_0}{x_1-x_0}.$$

Higher-order divided differences measure how the slope changes across more points. This method organizes the interpolation process in a way that is especially convenient for computation.

For example, if a new point is added to an existing table, Newton’s form often lets us extend the polynomial without starting over from scratch. That is why it is so important in Numerical Analysis: it connects theory with efficient computation.

A worked example and interpretation

Let’s interpret a small dataset as a real-world pattern. Suppose the height of a plant is recorded as $1$ cm at day $0$, $3$ cm at day $1$, and $2$ cm at day $2$. The data are not perfectly smooth, but we can still find a quadratic interpolating polynomial that matches all three values.

The result is a curve that goes through the measured heights exactly. At day $0.5$, the polynomial gives an estimated height. That estimate is not a measurement; it is a mathematically constructed value from the model.

This distinction is important. Interpolation gives a value consistent with the data, but it does not guarantee the real system behaves exactly like the polynomial. In fact, the polynomial is only a model of the data at the chosen nodes. Numerical Analysis studies how good that model is and how to compute it reliably.

Conclusion

Polynomial interpolation is a foundational idea in Interpolation I. It takes a set of distinct data points and builds a unique polynomial that passes through them exactly. This lets us estimate values between known samples and supports many practical applications. The lesson also prepares you for two major representations: the Lagrange form, which builds the polynomial from basis polynomials, and Newton divided differences, which organize computation efficiently.

students, the big takeaway is this: interpolation is about turning discrete information into a smooth algebraic model. In Numerical Analysis, that model must be both correct at the data points and useful for computation. Polynomial interpolation does exactly that, making it a central topic for understanding later methods in the course.

Study Notes

  • Polynomial interpolation finds a polynomial $P(x)$ such that $P(x_i)=y_i$ for each data point $(x_i,y_i)$.
  • The data points are called nodes, and the nodes must have distinct $x$-values.
  • For $n+1$ distinct points, there is exactly one interpolating polynomial of degree at most $n$.
  • A polynomial of degree at most $n$ cannot have more than $n$ roots unless it is the zero polynomial.
  • Polynomial interpolation is useful for estimating values between measured points 📊.
  • It is widely used in science, engineering, computing, and graphics.
  • Interpolation is exact at the chosen nodes, but it may behave poorly outside the data range.
  • The Lagrange form writes the polynomial as $P(x)=\sum_{i=0}^{n} y_iL_i(x)$.
  • Each Lagrange basis polynomial satisfies $L_i(x_j)=1$ when $i=j$ and $0$ when $i\ne j$.
  • The Newton form uses divided differences and has the structure $P(x)=a_0+a_1(x-x_0)+\cdots$.
  • Newton divided differences are efficient when adding new data points.
  • Polynomial interpolation is a core part of Interpolation I and prepares you for deeper numerical methods.

Practice Quiz

5 questions to test your understanding