Interpolation

Interpolation is a method of constructing new data points from a discrete set of known data points.

The most important type of interpolation is polynomial interpolation. Given a set of $$n+1$$ data points $$(x_i,y_i)$$ (for i=0..n), where no two $$x_i$$ are the same, one is looking for a polynomial $$P(x)$$ of degree at most $$n$$, satisfying $$P(x_i)=y_i$$ for i=0..n. It is known, that such a polynomial always exists and is unique.

There are several methods to find this polynomial, the simplest one is Lagrange form of interpolating polynomial:

$$ P(x) = \sum_{i=0}^n y_i \prod_{j=0,j \ne i}^n \frac{x-x_j}{x_i-x_j} $$

When you know, that a certain function is a polynomial (as, for example, is the case in many counting problems), you can reconstruct it from known values by the interpolating polynomial.