Polinômio Interpolador de Lagrange
Matemática

Polinômio Interpolador de Lagrange



Sejam $x_0, x_1, \cdots , x_n, (n+1)$ pontos distintos e $y_1=f(x_i)$ sendo $i=0,1,\cdots, n$.

Seja $P_n(x)$ o polinômio de grau $\leq n$ que interpola $f$ em $x_0, x_1, \cdots , x_n$. Podemos representar o polinômio $P_n(x)$ como:
\begin{equation*}
P_n(x) = y_0L_0(x) + y_1L_1(x) + \cdots + y_nL_n(x)
\end{equation*}
onde os polinômios $L_k(x)$ são de grau $n$.

Para cada $i$ queremos que a condição $P_n(x_i)=y_i$ seja satisfeita:
\begin{equation*}
P_n(x) = y_0L_0(x_i) + y_1L_1(x_i) + \cdots + y_nL_n(x_i) = y_i
\end{equation*}
Para que essa condição seja satisfeita é necessário impor que:
\begin{equation*}
L_k(x_i)=\left\{\begin{matrix}
1 & \text{se} & k & = & i\\
0 & \text{se} & k & \neq & i
\end{matrix}\right.
\end{equation*}
Podemos, assim, definir $L_k(x)$ como:
\begin{equation*}
L_k(x) = \frac{(x-x_0)(x-x_1)\cdots(x-x_{k-1})(x-x_{k+1})\cdots (x-x_n)}{(x_k-x_0)(x_k-x_1)\cdots (x_k-x_{k-1})(x_k-x_{k+1})\cdots (x_k-x_n)}
\end{equation*}

Polinômio de Lagrange de grau $1$

O polinômio de Lagrange de grau $1$ é dado por:
\begin{equation*}
P_1(x) = y_0L_0(x) + y_1L_1(x)
\end{equation*}
onde:
\begin{equation*}
L_0(x) = \frac{(x-x_1)}{(x_0-x_1)} \\
\ \\
\ \\
L_1(x) = \frac{(x-x_0)}{(x_1-x_0)}
\end{equation*}
Logo:
\begin{equation*}
y_0 \frac{(x-x_1)}{(x_0-x_1)} +y_1  \frac{(x-x_0)}{(x_1-x_0)}
\end{equation*}

Polinômio de Lagrange de grau $2$

O polinômio de Lagrange de grau $2$ é dado por:
\begin{equation*}
P_2(x) = y_0L_0(x) + y_1L_1(x) + y_2L_2(x)
\end{equation*}
onde:
\begin{equation*}
L_0(x) = \frac{(x-x_1)(x-x_2)}{(x_0-x_1)(x_1-x_2)}\\
\ \\
\ \\
L_1(x) = \frac{(x-x_0)(x-x_2)}{(x_1-x_0)(x_1-x_2)}\\
\ \\
\ \\
L_2(x) = \frac{(x-x_0)(x-x_1)}{(x_2-x_0)(x_2-x_1)}\\
\end{equation*}
Logo:
\begin{equation*}
P_2(x) = y_0 \frac{(x-x_1)(x-x_2)}{(x_0-x_1)(x_0-x_2)} + y_1  \frac{(x-x_0)(x-x_2)}{(x_1-x_0)(x_1-x_2)} + y_2 \frac{(x-x_0)(x-x_1)}{(x_2-x_0)(x_2-x_1)}\\
\end{equation*}

Polinômio de Lagrande de grau $3$

O polinômio de Lagrange de grau $3$ é dado por:
\begin{equation*}
P_2(x) = y_0 \frac{(x-x_1)(x-x_2)(x-x_3)}{(x_0-x_1)(x_1-x_2)(x_0-x_3)} + y_1  \frac{(x-x_0)(x-x_2)(x-x_3)}{(x_1-x_0)(x_1-x_2)(x_1-x_3)} + y_2 \frac{(x-x_0)(x-x_1)(x-x_3)}{(x_2-x_0)(x_2-x_1)(x_2-x_3)} + y_3\frac{(x-x_0)(x-x_1)(x-x_2)}{(x_3-x_0)(x_3-x_1)(x_3-x_2)}
\end{equation*}

Polinômio de Lagrande de grau $n$

O polinômio de Lagrande de grau $n$ é dado por:
\begin{equation*}
P_n(x) = y_0\frac{\displaystyle \prod_{i=1}^n (x-x_i)}{\displaystyle \prod _{i=1}^n(x_0-x_i)} + y_1 \frac{\displaystyle \prod_{\substack{i=0 \\i\neq 1}}^n (x-x_i)}{\displaystyle \prod _{\substack{i=0 \\i \neq 1}}^n(x_1-x_i)}+\cdots +y_n \frac{\displaystyle \prod_{i=0}^{n-1}(x-x_i)}{\displaystyle \prod_{i=0}^{n-1}(x_n-x_i)}
\end{equation*}
Que pode ser sintetizado como:
\begin{equation*}
P_n(x) = \sum_{j=0}^{n} \ y_j \ \frac{\displaystyle \prod_{\substack{i=0 \\ i \neq j}}^n (x_1-x_i)}{\displaystyle \prod_{\substack{i=0 \\ i \neq j}}^n (x_j-x_i)}
\end{equation*}

Exemplo teórico

Encontrar o polinômio interpolador na forma de Lagrange que interpole $[x_0, f(x_0)], [x_1, f(x_1)]$.

Termos que $n=1$. Então podemos dizer que será uma interpolação linear. Pela forma de Lagrange, podemos utiliar o polinoômio interpolador de grau $1$:
\begin{equation*}
P_1(x) = y_0 L_0(x) + y_1L_1(x)\\
\ \\
P_1(x) = y_0 \frac{(x-x_1)}{(x_0-x_1)} + y_1 \frac{(x-x_0)}{(x_1-x_0)} \\
\ \\
P_1(x) = y_0 \frac{(x_1-x)}{(x_1-x_0)} + y_1 \frac{(x-x_0)}{(x_1-x_0)}\\
\ \\
P_1(x) = \frac{y_0(x_1-x)+y_1(x-x_0)}{(x_1-x_0)}
\end{equation*}
Que é exatamente a equação da reta que passa pelos pontos $[x_0, f(x_0)], [x_1, f(x_1)]$.

Exemplo numérico

Considere a tabela abaixo. Encontre o polinômio interpolador pela forma de Lagrange e calcule $f(x)$ no ponto $x=1$.

Pela forma de Lagrange, temos que:
\begin{equation*}
P_2(x) = y_0L_0(x) + y_1L_1(x) + y_2L_2(x)\\
\ \\
P_2(x) = y_0 \frac{(x-x_1)(x-x_2)}{(x_0-x_1)(x_0-x_2)} + y_1  \frac{(x-x_0)(x-x_2)}{(x_1-x_0)(x_1-x_2)} + y_2 \frac{(x-x_0)(x-x_1)}{(x_2-x_0)(x_2-x_1)}
\end{equation*}
Substituindo os valores da tabela, obtemos:
\begin{equation*}
P_2(x) = 4 \frac{(x-0)(x-2)}{(-1-0)(-1-2)} + 1  \frac{(x+1)(x-2)}{(0+1)(0-2)} -1 \frac{(x+1)(x-0)}{(2+1)(2-0)}\\
\ \\
P_2(x) = \frac{4(x^2-2x)}{3} +\frac{(x^2-x-2)}{(-2)}-\frac{(x^2+x)}{6}\\
\ \\
P_2(x) = \frac{4-8x}{3} + \frac{x+2-x^2}{2} - \frac{x^2+x}{6}\\
\ \\
P_2(x) = \frac{8x^2 - 16x + 3x+6-3x^2-x^2-x}{6}\\
\ \\
P_2(x) = \frac{4x^2-14x+6}{6}\\
\ \\
P_2(x) = \frac{2x^2}{3} - \frac{7x}{3} +1
\end{equation*}
Para calcularmos $f(x)$ no ponto $x=1$, fazemos:
\begin{equation*}
P_2(x) = \frac{4x^2-14x+6}{6}\\
\ \\
P_2(1) = \frac{4\cdot 1^2-14\cdot 1+6}{6}\\
\ \\
P_2(1)=\frac{4-14+6}{6}=-\frac{4}{6}=-\frac{2}{3}
\end{equation*}

Referências

[1] Notas de aula

Veja mais:

Interpolação Polinomial - Resolução por Sistemas Lineares
Zeros Reais de Funções Reais - O Método de Newton-Raphson
Interpolação Polinomial no Blog Fatos Matemáticos: Partes 1, 2 e 3

Imprimir






- Resolução Da Integral $\displaystyle \int \frac{x^2+1}{x^2-1}dx$
Nesta postagem, veremos que: \begin{equation*} \int \frac{x^2+1}{x^2-1}dx = x+ \ln|x-1|- \ln|x+1| + C \end{equation*} onde $x \in \mathbb{R}$, sendo $x \neq \pm 1$. Seja a integral: \begin{equation*} I = \int \frac{x^2+1}{x^2-1}dx \end{equation*} Decompomos...

- Resolução Da Integral $\displaystyle \int \frac{1}{x^2+a^2}dx$
Nesta postagem, vamos provar que: \begin{equation*} \int \frac{1}{x^2+a^2}\ dx = \frac{1}{a}\text{arctg}\left(\frac{x}{a}\right) + C \end{equation*} onde $a$ é uma constante, tal que $a \in \mathbb{R}^\ast$, sendo $x^2 + a^2 \neq 0$. Seja a integral:...

- Resolução Da Integral $\int \frac{1}{a\ E^{bx}}dx$
Nesta postagem, vamos demonstrar que: \begin{equation*} \int \frac{1}{a\ e^{bx}}dx = -\frac{e^{-bx}}{ab}+C \end{equation*} onde $a$ e $b \in \mathbb{R}$ e $a$ e $b \neq 0$. Seja a integral: \begin{equation*} I = \int \frac{1}{a\ e^{bx}}dx = \int \frac{e^{-bx}}{a}...

- Integral Indefinida Do Produto De Cossenos De Monômios De Coeficientes Angulares Diferentes
Neste artigo, veremos como encontrar uma fórmula para calcular a integral do produto de dois cossenos, cujos argumentos são monômios. Vamos demonstrar que: \begin{equation} \int \cos(ax) \cos(bx)dx = \frac{\text{sen}[(a-b)x]}{2(a-b)} + \frac{\text{sen}[(a+b)x]}{2(a+b)}...

- Resolução Da Integral $\int \cos(x) \cos(2x)dx$
Para a resolução desta integral, usaremos a técnica de integração por substituição e usaremos uma identidade trigonométrica que transforma um produto de cossenos em soma. Seja a integral: \begin{equation} \int \cos(2x) \cos(x) dx \end{equation}...



Matemática








.