Lagrange Polynomial Approximation

Theorem
Let $f: D \to \R$ be $n+1$ times differentiable in an interval $I \subset \R$.

Let $x_0, \dotsc, x_n \in I$ be pairwise distinct points.

Let $P$ be the polynomial of degree at most $n$ such that $P \left({x_i}\right) = f \left({x_i}\right)$ for all $i = 0, \dotsc, n$.

Let $R \left({x}\right) = f \left({x}\right) - P \left({x}\right)$.

Then, for every $x \in I$, there exists $\xi$ in the interval spanned by $x$ and $x_i$, $i = 0, \dotsc, n$, such that:
 * $R \left({x}\right) = \dfrac{\left({x - x_0}\right) \left({x - x_1}\right) \dotsm \left({x - x_n}\right) f^{\left({n + 1}\right)} \left({\xi}\right)} {\left({n + 1}\right)!}$

Proof
This proof is similar to the proof of Taylor's theorem with the remainder in the Lagrange form, and is also based on the Rolle's Theorem.

Observe that:
 * $R \left({x_i}\right) = 0$ for $i = 0, \dotsc, n$

and that:
 * $R^{\left({n + 1}\right)} = f^{\left({n + 1}\right)}$

, assume that $x$ is different from all $x_i$ for $i = 0, \dotsc, n$.

Let the function $g$ be defined by:
 * $g \left({t}\right) = R \left({t}\right) - \dfrac{\left({t - x_0}\right) \left({t - x_1}\right) \dotsm \left({t - x_n}\right) R \left({x}\right)} {\left({x - x_0}\right) \left({x - x_1}\right) \dotsm \left({x - x_n}\right)}$

Then $g \left({x_i}\right) = 0$ for $i = 0, \dotsc, n$, and $g \left({x}\right) = 0$.

Denote by $J$ the interval spanned by $x$ and $x_i$, $i = 0, \dotsc, n$.

Thus $g$ has at least $n + 2$ zeros in $J$.

By applying Rolle's theorem successively to $g$, to $g'$, and so until $g^{\left({n}\right)}$, one obtains that:
 * $g'$ has at least $n + 1$ distinct zeros in $J$
 * $g''$ has at least $n$ distinct zeros in $J$

and so on until:
 * $g^{\left({n + 1}\right)}$, which thus has at least one zero $\xi$ in $J$.

Then:
 * $0 = g^{\left({n + 1}\right)} \left({\xi}\right) = f^{\left({n + 1}\right)} \left({\xi}\right) - \dfrac{\left({n + 1}\right)! R \left({x}\right)} {\left({x - x_0}\right) \left({x - x_1}\right) \dotsm \left({x - x_n}\right)}$

and the formula for $R \left({x}\right)$ follows.

Comment
This theorem gives an estimate for the error of the Lagrange polynomial approximation and is similar to the Mean Value Theorem and the Taylor's Theorem with the remainder in Lagrange form.