Thursday, March 15, 2018

Lagrange interpolation polynomials

Count Joseph Louis Lagrange, French mathematician was born in 1736 and died in 1813.

We look, in this paragraph, an expression of the polynomial with degree at most \(\mathfrak{n}\) taking the same values as a given function in \(\mathfrak{n} + 1\) given two, two distincts points, then to study the committed error by trying to minimize it.


1) Definition of polynomials \({L_k}\)

Let \(\mathfrak{n}\) be a natural integer then \({x_0},{x_1}, \ldots ,{x_n}\) \(\left( {\mathfrak{n} + 1} \right)\) complex two, two distincts.
We look \(\left( {\mathfrak{n} + 1} \right)\) polynomials \({L_0}, \ldots ,{L_n}\) all with degree at most \(\mathfrak{n}\), verifying the equalities :
$\forall \left( i,~j \right)\in {{\left[\!\left[ 0,n \right]\!\right]}^{2}},~{{L}_{i}}\left( {{x}_{j}} \right)={{\delta }_{i,j}},$
(where \({\delta _{i,\mathfrak{j}}}\) is the kronecker symbol defined by \({\delta _{i,\mathfrak{j}}} = \left\{ \begin{array}{l}0 \ {\rm{ si }} \ i \ne j\\1 \ {\rm{ si }} \ i = j\end{array} \right.\) ).
Let \(i\) a natural integer element of given \(\left[\kern-0.15em\left[ {0,n}
\right]\kern-0.15em\right]\). The polynomial \({L_i}\) has a degree at most \(\mathfrak{n}\) and admits the \(\mathfrak{n}\) complex two, two distincts \({x_j}\), \(\mathfrak{j} \ne i\), as roots. Then, necessairely, it exist a constant \(C\) such as
\({L_i} = C\prod\limits_{i \ne j} {(X - {x_j})} \) .
The equality\({L_i}\left( {{x_i}} \right) = 1\) gives then \(C = \frac{1}{{\prod\limits_{j \ne i} {\left( {{x_i} - {x_j}} \right)} }}\) and then necessairely \({L_i} = \prod\limits_{j \ne i} {\left( {\frac{{X - {x_\mathfrak{j}}}}{{{x_i} - {x_\mathfrak{j}}}}} \right)} \) .
Reciprocally, if for all \(i \in \left[\kern-0.15em\left[ {0,n}
\right]\kern-0.15em\right],\)\({L_i} = \prod\limits_{\mathfrak{j} \ne i} {\left( {\frac{{X - {x_\mathfrak{j}}}}{{{x_{\dot i}} - {x_\mathfrak{j}}}}} \right)} \) then \({L_i}\) est well defined because the \({x_{\dot j}}\) are two, two distincts, with degree \(\mathfrak{n}\) exactly and finally the polynomials \({L_i}\) verify clairly the duality equalities: $\forall \left( i,~\mathfrak{j} \right)\in {{\left[\!\left[ 0,n \right]\!\right]}^{2}},\text{ }{{L}_{i}}\left( {{x}_{j}} \right)={{\delta }_{i,j}}$.
Let \(n\) a natural integer then \({x_0},{x_1},...,{x_n}\), \(\left( {n + 1} \right)\) given complex two, two distincts.
It exists one and only one set, noted \({({L_i})_{0 \le i \le \mathfrak{n}}}\), with \(\left( {n + 1} \right)\) polynomials of degree at most \(n\) verifying :
$\forall \left( i,~j \right)\in {{\left[\!\left[ 0,n \right]\!\right]}^{2}},~{{L}_{i}}\left( {{x}_{i}} \right)={{\delta }_{i,j}}.$
Furthermore : $\forall \left( i,~j \right)\in {{\left[\!\left[ 0,n \right]\!\right]}^{2}},\text{ }{{L}_{i}}=\prod\limits_{j\ne i}{\left( \frac{X-{{x}_{j}}}{{{x}_{{\dot{i}}}}-{{x}_{j}}} \right)}$.




2) The set \({({L_k})_{0 \le k \le n}}\) is a base of \(\mathbb{C}\left[ X \right]\)

The \({L_k}\) are all in \({\mathbb{C}_n}\left[ X \right]\). Let’s demonstrate that the set \({({L_k})_{0 \le k \le n}}\) is a linearly independent set of \({\mathbb{C}_n}\left[ X \right].\)
Let $\left( {{\lambda }_{0}},~{{\lambda }_{n}} \right)\in {{\mathbb{C}}^{n+1}}.$
\(\mathop \sum \limits_{\dot i = 0}^n {\lambda _i}{L_i} = 0 \Rightarrow \forall \mathfrak{j} \in {\left[\kern-0.15em\left[ {0,n}
\right]\kern-0.15em\right]^2},\mathop \sum \limits_{\dot i = 0}^n {\lambda _i}{L_i}\left( {{x_{\dot j}}} \right) = 0 \Rightarrow \forall \mathfrak{j} \in {\left[\kern-0.15em\left[ {0,n}
\right]\kern-0.15em\right]^2},\mathop \sum \limits_{\dot i = 0}^n {\lambda _i}{\delta _{ij}} = 0 \Rightarrow \forall \mathfrak{j} \in \left[\kern-0.15em\left[ {0,n}
\right]\kern-0.15em\right],{\lambda _{\dot j}} = 0.\)
So the set \({({L_k})_{0 \le k \le n}}\) is a linearly independent set \({\mathbb{C}_n}\left[ X \right]\). As $card{{({{L}_{k}})}_{0\le k\le n}}=\mathfrak{n}+1=\text{ }\!\!~\!\!\text{ dim }\!\!~\!\!\text{ }\left( {{\mathbb{C}}_{n}}\left[ X \right] \right)<+\infty $, the set \({({L_k})_{0 \le k \le n}}\) is a base of \({\mathbb{C}_n}\left[ X \right].\)
The set \({\left( {{L_k}} \right)_{0 \le k \le n}}\) is a base of \(\mathbb{C}\left[ X \right].\)

3) Dual base of the set \({({L_k})_{0 \le k \le n}}\)

Let \(\mathfrak{n}\) be a natural integer then \({x_0},{x_1},...,{x_n},\left( {n + 1} \right)\) complex two, two distincts. For given \(\mathfrak{j} \in \left[\kern-0.15em\left[ {0,n}
\right]\kern-0.15em\right]\), we note \({\varphi _\mathfrak{j}}\) the linear form on \(\mathbb{C}\left[ X \right]\) defined by :
\(\forall P \in {\mathbb{C}_n}\left[ X \right],{\rm{ }}{\varphi _j}\left( P \right) = P\left( {{x_j}} \right)\) (\({\varphi _j}\) is “the evaluation in \({x_j}\)”)
The equalities \({L_i}\left( {{x_\mathfrak{j}}} \right) = {\delta _{i,\mathfrak{j}}}\) are still written
$\forall \left( i,~\mathfrak{j} \right)\in \left[\!\left[ 0,n \right]\!\right],\text{ }{{\varphi }_{\mathfrak{j}}}\left( {{L}_{i}} \right)={{\delta }_{i,\mathfrak{j}}}$or also \(\left\langle {{L_i},{\varphi _j}} \right\rangle = {\delta _{i,\mathfrak{j}}}.\)
Which means, since \(\mathbb{C}\left[ X \right]\) is finite-dimensional, that the set \({({\varphi _j})_{0 \le j \le n}}\) is the dual base of the set \({({L_i})_{0 \le i \le n}}\) (and particularly a base of the dual of \({\mathbb{C}_n}\left[ X \right]\)).
The dual basis of the basis \({({L_k})_{0 \le k \le \mathfrak{n}}}\) is the set of linear forms \({({\varphi _j})_{0 \le j \le \mathfrak{n}}}\) defined by :
\(\forall j \in {{\left[\!\left[ 0,n \right]\!\right]}}, \forall P \in {\mathbb{C}_n}\left[ X \right],{\varphi _j}\left( P \right) = P\left( {{x_j}} \right)\).

4) Coordinates of a polynomial with degree at most \(n\) in the base \({({L_k})_{0 \le k \le n}}\)

Keeping the previous notations, we give ourselves more \(\left( {n + 1} \right) - uplet\) any $\left( {{y}_{0}},~\ldots ,~{{y}_{n}} \right)$ of complex numbers. We search for polynomials \(P\) with degree at most \(n\) verifying
\(\forall \mathfrak{j} \in \left[\kern-0.15em\left[ {0,n}
\right]\kern-0.15em\right],P\left( {{x_{\dot j}}} \right) = {y_j}.\)
Let \(P \in {\mathbb{C}_n}\left[ X \right]\). We note $\left( {{\lambda }_{0}},...,~{{\lambda }_{n}} \right)$ the coordinates of \(P\) in the base \({({L_i})_{0 \le i \le n}}\) of \({\mathbb{C}_n}\left[ X \right]\). So we have \(P = \mathop \sum \limits_{\dot i = 0}^n {\lambda _i}{L_i}.\) Now, for \({\mathfrak{j}^{th}}\) element of \(\left[\kern-0.15em\left[ {0,n}
\right]\kern-0.15em\right]\)
$P\left( {{x}_{j}} \right)=\underset{\dot{i}=0}{\overset{n}{\mathop \sum }}\,{{\lambda }_{i}}{{L}_{i}}\left( {{x}_{j}} \right)=\underset{\dot{i}=0}{\overset{n}{\mathop \sum }}\,{{\lambda }_{i}}{{\delta }_{i,j}}~={{\lambda }_{j}}.$
Thus,
\(\forall \mathfrak{j} \in \left[\kern-0.15em\left[ {0,n}
\right]\kern-0.15em\right],P\left( {{x_\mathfrak{j}}} \right) = {y_\mathfrak{j}} \Leftrightarrow \forall \mathfrak{j} \in \left[\kern-0.15em\left[ {0,n}
\right]\kern-0.15em\right],{\lambda _\mathfrak{j}} = {y_\mathfrak{j}}.\)
we showed that
$\forall P\in {{\mathbb{C}}_{\mathfrak{n}}}\left[ X \right],~P=\underset{i=0}{\overset{\mathfrak{n}}{\mathop \sum }}\,P\left( {{x}_{i}} \right){{L}_{i}},$
and also that
Let \(n\) be a naturel integer, \({x_0},...,{x_n},\left( {n + 1} \right)\) complex two, two distincts and \({y_0},...,{y_n},\left( {n + 1} \right)\)complex. There is one and only one polynomial \(P\) with degree at most \(n\) verifying \(\forall j \in {{\left[\!\left[ 0,n \right]\!\right]}}, P\left( {{x_i}} \right) = {y_i}\) namely
\(P = \mathop \sum \limits_{i = 0}^\mathfrak{n} {y_i}{L_i} = \mathop \sum \limits_{\dot i = 0}^\mathfrak{n} {y_i}\prod\limits_{j \ne i} {\left( {\frac{{X - {x_j}}}{{{x_i} - {x_j}}}} \right)} \) .


5) Polynomials of degree at most 2 taking given values at given points

  • Case \(n = 1\). Let \({x_0}\) and \({x_1}\) be two complex distincts and let \({y_0}\) and \({y_1}\) two complex. The polynomial with degree at most 1 which verifies \(P\left( {{x_0}} \right) = {y_0}\) and \(P\left( {{x_1}} \right) = {y_1}\) is
\(P = {y_0}\frac{{X - {x_1}}}{{{x_0} - {x_1}}} + {y_1}\frac{{X - {x_0}}}{{{x_1} - {x_0}}} = \frac{{f\left( {{x_1}} \right) - f\left( {{x_0}} \right)}}{{{x_1} - {x_0}}}\left( {X - {x_0}} \right) + {y_0}.\)
  • Case \(n = 2\). Let \({x_0},\) \({x_1}\) and \({x_2}\) three complex two, two distincts and let \({y_0},\) \({y_1}\) and \({y_2}\) three complex. The polynomial with degree at least 2 which verifies \(P\left( {{x_0}} \right) = {y_0},\) \(P\left( {{x_1}} \right) = {y_1}\) and \(P\left( {{x_2}} \right) = {y_2}\) is
\(P = {y_0}\frac{{\left( {X - {x_1}} \right)\left( {X - {x_2}} \right)}}{{\left( {{x_0} - {x_1}} \right)\left( {{x_0} - {x_2}} \right)}} + {y_1}\frac{{\left( {X - {x_0}} \right)\left( {X - {x_2}} \right)}}{{\left( {{x_1} - {x_0}} \right)\left( {{x_1} - {x_2}} \right)}} + {y_2}\frac{{\left( {X - {x_0}} \right)\left( {X - {x_1}} \right)}}{{\left( {{x_2} - {x_0}} \right)\left( {{x_2} - {x_1}} \right)}}.\)
Furthermore,
$\text{ }\!\!~\!\!\text{ deg }\!\!~\!\!\text{ }\left( P \right)=2\Leftrightarrow {{y}_{0}}\frac{1}{\left( {{x}_{0}}-{{x}_{1}} \right)\left( {{x}_{0}}-{{x}_{2}} \right)}+{{y}_{1}}\frac{1}{\left( {{x}_{1}}-{{x}_{0}} \right)\left( {{x}_{1}}-{{x}_{2}} \right)}+{{y}_{2}}\frac{1}{\left( {{x}_{2}}-{{x}_{0}} \right)\left( {{x}_{2}}-{{x}_{1}} \right)}\ne 0$
\( \Leftrightarrow \left( {{x_1} - {x_2}} \right){y_0} + \left( {{x_2} - {x_0}} \right){y_1} + \left( {{x_0} - {x_1}} \right){y_2} \ne 0 \\ \Leftrightarrow \left( {{x_2} - {x_0}} \right)\left( {{y_1} - {y_0}} \right) - \left( {{y_2} - {y_0}} \right)\left( {{x_1} - {x_0}} \right) \ne 0\)
\( \Leftrightarrow \) the three points $\left( {{x}_{0}},~{{y}_{0}} \right)$, \(\left( {x,y} \right)\) and $\left( {{x}_{2}},~{{y}_{2}} \right)$ are not aligned.
We have almost shown that:
by three non-aligned points, it passes a parable and a single one.

6) Transformation matrix from the base of the Lagrange polynomials to the canonical basis

We apply the 4) to the particular case where the polynomial \(P\) is one of the elements of the canonical basis \({({X^\mathfrak{j}})_{0 \le j \le n}}\) of \({\mathbb{C}_n}\left[ X \right]\). We obtain \(\mathop \sum \limits_{i = 0}^n {L_i} = 1\) and more generally,
$\forall j\in \left[\!\left[ 0,n \right]\!\right],~{{X}^{j}}=\underset{i=0}{\overset{n}{\mathop \sum }}\,x_{i}^{j}{{L}_{i}}.$
Thus the matrix of the canonical basis $\left( 1,~X,~\ldots ,~{{X}^{n}} \right)$ in the basis $\left( {{L}_{0}},~{{L}_{1}},~...,{{L}_{n}} \right)$ is the matrix \({(x_{\dot i}^\mathfrak{j})_{0 \le i,j \le n}}\). We recognize the Vandermonde matrix of \({x_i},{\rm{ }}i \in \left[\kern-0.15em\left[ {0,n}
\right]\kern-0.15em\right]\).
The transformation matrix from the basis \({({L_i})_{0 \le i \le n}}\) to teh basis \({({X^j})_{0 \le i \le n}}\) is the matrix of Vandermonde \({(x_i^j)_{0 \le i,j \le n}}\) associated to the set \({({x_i})_{0 \le i \le n}}.\)

7) Lagrange interpolation polynomial of a function in \(\left( {n + 1} \right)\) points and estimation of the error

According to 4) :
Let \(n\) be a naturel integer. Let \({x_0},...,{x_n},\left( {n + 1} \right)\) be reals two, two distincts of a segment $\left[ a,~b \right]$ and \(f\) a fonction from $\left[ a,~b \right]$ to \(\mathbb{R}\).
There is one and only one polynomial of degree at most \(n\) verifying \(\forall i \in {{\left[\!\left[ 0,n \right]\!\right]}}, P\left( {{x_i}} \right) = f\left( {{x_i}} \right)\) namely
\(P = \mathop \sum \limits_{i = 0}^\mathfrak{n} f\left( {{x_i}} \right){L_i} = \mathop \sum \limits_{i = 0}^\mathfrak{n} f\left( {{x_i}} \right)\prod\limits_{j \ne i} {\left( {\frac{{X - {x_j}}}{{{x_i} - {x_j}}}} \right)} \) .
We note from now on \({L_{f,n}}\) the previous polynomial and we study the error committed \(f\left( x \right) - {L_{f,n}}\left( x \right)\) for \(x\) element of $\left[ a,~b \right]$ when \(f\) is a function of class \({C^{n + 1}}\) on $\left[ a,~b \right].$
Let \(x\) be a fixed real of $\left[ a,~b \right]$ distinct of \({x_i}\). We note \(N\) the polynomial \(\mathop \prod \limits_{k = 0}^n (X - {x_k})\) . For \(t\) element of $\left[ a,~b \right]$, we consider
\(\varphi \left( t \right) = f\left( t \right) - {L_{f,n}}\left( t \right) - A \times N\left( t \right)\) where A is chosen so that \(\varphi \left( x \right) = 0,\)
(which is possible since \(x\) is distinct of \({x_i}\) and so \(N\left( x \right) \ne 0\)).
Since \(f\) is of class \({C^{n + 1}}\) on $\left[ a,~b \right]$ with values in \(\mathbb{R}\) and that \({L_{f,n}}\) and \(N\) are polynomials, \(\varphi \) is still of class \({C^{n + 1}}\) on $\left[ a,~b \right]$. Now, \(\varphi \) is zero in the \(\left( {n + 2} \right)\) reals two, two distincts \(x,{x_0},...,{x_n}\) of $\left[ a,~b \right]$ (since \(\forall i \in \left[\kern-0.15em\left[ {0,n}
\right]\kern-0.15em\right],f\left( {{x_i}} \right) = {L_{f,n}}\left( X \right)\)and that \(N\left( {{x_i}} \right) = 0\)) and is of class \({C^{n + 1}}\) on $\left[ a,~b \right].$
Rolle's theorem then shows that \(\varphi '\) is canceled in at least \(\left( {n + 1} \right)\) reals two, two distincts of \(\left] {a,b} \right[\) (once in each of \(\left( {\mathfrak{n} + 1} \right)\) open intervals defined by \(x\) and the \({x_i}\)). In reiterating this reasoning, for all \(k\) element of, \(\left[\kern-0.15em\left[ {0,n + 1}
\right]\kern-0.15em\right]\), \({\varphi ^{\left( k \right)}}\) is cancelled in \(\left( {\mathfrak{n} + 2 - k} \right)\) reals two, two distincts \(\left] {a,b} \right[\). In particular, \({\varphi ^{\left( {n + 1} \right)}}\) is canceled in at least one real \(\left] {a,b} \right[\)noted \({c_x}.\)
Now, since \({L_{f,n}}\) is with a degree at most \(n\) and that \(N\) is unitary of degree \(\left( {n + 1} \right)\) ,
\({\phi ^{\left( {n + 1} \right)}} = {f^{\left( {n + 1} \right)}} - A \times \left( {\mathfrak{n} + 1} \right)!\)
And the equality \({\varphi ^{\left( {n + 1} \right)}}\left( {{c_x}} \right) = 0\) is still written
\(A = \frac{{{f^{\left( {n + 1} \right)}}\left( {{c_x}} \right)}}{{\left( {n + 1} \right)!}}.\)
By explaining the equality \(\varphi \left( x \right) = 0\), we have shown that:
$\forall x\in \left[ a,~b \right]\backslash \left\{ {{x}_{0}},~{{x}_{n}} \right\}\exists {{c}_{x}}\in \left] a,~b \right[/f\left( x \right)-L{{f}_{n}}\left( x \right)=\frac{{{f}^{\left( n+1 \right)}}\left( {{c}_{x}} \right)}{\left( n+1 \right)!}N\left( x \right)$ .
This result remains clear if\(x\) is one of\({x_i}\) because, in this case,\(f\left( x \right) - {L_{f,n}}\left( x \right)\) and \(N\left( x \right)\) are void so that no real \({c_x}\) of \(\left] {a,b} \right[\) appropriate. So :

Let \(n\) be a naturel integer. Let \({x_0},...,{x_n},\left( {n + 1} \right)\) reals two, two distincts of a segment $\left[ a,~b \right]$ and \(f\) a fonction of class \({C^{n + 1}}\) on $\left[ a,~b \right]$ with values in \(\mathbb{R}\).
$\forall x\in \left[ a,~b \right]\backslash \left\{ {{x}_{0}},~{{x}_{n}} \right\}\exists {{c}_{x}}\in \left] a,b \right[/ \\ f\left( x \right)-L{{f}_{n}}\left( x \right)=\frac{{{f}^{\left( \mathfrak{n}+1 \right)}}\left( {{c}_{x}} \right)}{\left( n+1 \right)!}N\left( x \right)\text{ o }\!\!\grave{\mathrm{u}}\!\!\text{ }N\left( x \right)=\underset{i=0}{\overset{\mathfrak{n}}{\mathop \prod }}\,(X-{{x}_{i}})$

No comments:

Post a Comment