Lagrange polynomial interpolation maximum degree

interpolationlagrange-interpolationnumerical methodspolynomials

I want to prove that no polynomial of degree $1$ that passes through $(0, \cos(0))$, $(0.6, \cos(0.6))$ and $(0.9, \cos(0.9))$. By the following theorem:
Theorem 1. If $x_{0}, x_{1}, \ldots, x_{n}$ are $n+1$ distinct numbers and $f$ is a function whose values are given at these points, then a unique polynomial $P(x)$ of degree at most $n$ exists with
$$
f\left(x_{k}\right)=P\left(x_{k}\right), \quad \text { for each } k=0,1, \ldots, n
$$

This polynomial is given as
$$
P(x)=f\left(x_{0}\right) L_{n, 0}(x)+\cdots+f\left(x_{n}\right) L_{n, n}(x)=\sum_{k=0}^{n} f\left(x_{k}\right) L_{n, k}(x), \quad \text { where } L_{n, k}=\prod_{i=0 \atop i \neq k}^{n} \frac{x-x_{i}}{x_{k}-x_{i}}
$$

Suppose that I picked $x_0$ and $x_1$ for the degree $1$ polynomial, that by the above theorem, $f(x_3)$ does not necessarily equal $P(x_3)$, so it does not guarantee to pass through all 3 points. However, this only shows that it is guaranteed to pass through 2 points but it does not state that it must not pass through all 3 points, how can I prove that in this case? Thank you

Best Answer

You get using the equivalent Newton interpolation formula $$ p_2(x)=f(x_0)+f[x_0,x_1](x-x_0)+f[x_0,x_1,x_2](x-x_0)(x-x_1)=p_1(x)+f[x_0,x_1,x_2](x-x_0)(x-x_1) $$ So at $x=x_2$ you get $$ f(x_2)=p_2(x_2)=p_1(x_2)+f[x_0,x_1,x_2](x_2-x_0)(x_2-x_1) $$ Now $f[x_0,x_1,x_2]=\frac12f''(\xi)$ for some point in the middle, which means that the error $$ p_1(x_2)-f(x_2)=-f[x_0,x_1,x_2](x_2-x_0)(x_2-x_1) $$ is decidedly positive for the given situation, as $\cos x>\frac12$ for $x\in[0,0.9]$.

Related Question