Interpolação Linear
Dados dois pontos distintos de uma função \(y = f(x):(x_0, y_0) \textrm{ e } (x_1, y_1)\), deseja-se calcular o valor de \(\overline{y} \) para um determinado valor de \(\overline{x} \) entre \(x_0\) e \(x_1\), usando Interpolação linear.
Pode-se provar que o grau do polinômio interpolador é uma unidade menor que o número de pontos conhecidos. Assim o polinômio interpolador nesse caso terá grau 1, isto é:
\[P_1(x) = a_1x + a_0\]Para determiná-lo, os coefientes \(a_0\) e \(a_1\) devem ser calculados de forma que se tenha:
\[P_1(x_0) = f(x_0) = y_0\]e
\[P_1(x_1) = f(x_1) = y_1\]ou seja, é necessário resolver o sistema linear:
\[\left\{\begin{matrix}a_1x_0 + a_0 = y_0 \\a_1x_1 + a_0 = y_1 \end{matrix} \right. \]onde \(a_0\) e \(a_1\) são as incógnitas e
\[A = \begin{bmatrix} x_{0} & 1 \\ x_{1} & 1 \end{bmatrix} \textrm{ é a matriz dos coeficientes}\]O determinante da matriz \(A\) é diferente de zero, sempre que \(x_0 \neq x_1\), logo para pontos distintos o sistema tem solução única
Exemplo
Dados os pontos:
| x | \(\color{red} 1\) | \(\color{blue} 3\) |
|---|---|---|
| y | \(\color{green} 1.5\) | \(\color{grey} 2\) |
Representado pelo gráfico

O sistema linear ficaria:
\[\left[\begin{matrix} \color{red} 1 & 1 \\ \color{blue} 3 & 1 \end{matrix} \right. \left|\begin{matrix} \color{red} \color{green} 1.5 \\ \color{grey} 2 \end{matrix} \right]\]E o sistema resolvido:
\[\left[\begin{matrix} 1 & 0 \\ 0 & 1 \end{matrix} \right. \left|\begin{matrix} 0.25 \\ 1.25 \end{matrix} \right]\]Com isso, nossa função ficaria:
\[P_1(x) = 0.25x + 1.25\]Interpolação Quadrática
Semelhante ao processo de Interpolação linear, se forem dados 3 pontos distintos, é possível obter o polinômio interpolador:
\[P_2(x) = a_2x^2 + a_1x + a_0\]Para determinar os valores de \(a_2\), \(a_1\) e \(a_0\) é necessári resolver o sistema:
\[\left\{\begin{matrix} a_2x_0^2 +a_1x_0 + a_0 = y_0 \\a_2x_1^2 +a_1x_1 + a_0 = y_1 \\a_2x_2^2 +a_2x_2 + a_0 = y_2 \end{matrix} \right. \]A Matriz de coeficientes ficaria:
\[A = \begin{bmatrix} x_{0}^2 &x_{0} & 1 \\x_{1}^2 &x_{1} & 1 \\x_{2}^2 &x_{2} & 1 \end{bmatrix} \]Exemplo
Dados os pontos:
| x | \(\color{red} 1\) | \(\color{blue} 3\) | \(\color{orchid} 4\) |
|---|---|---|---|
| y | \(\colorbox{green} {1.5}\) | \(\colorbox{grey} {2}\) | \(\colorbox{RoyalBlue} {1.5}\) |
De forma gráfica:

O sistema linear ficaria:
\[\left[\begin{matrix} \color{red} 1^2 & \color{red} 1 & 1 \\ \color{blue} 3^2 & \color{blue} 3 & 1 \\ \color{orchid} 4^2 & \color{orchid} 4 & 1 \end{matrix} \right. \left|\begin{matrix} \colorbox{green} {1.5} \\ \colorbox{grey} {2} \\\colorbox{RoyalBlue} {1.5} \end{matrix} \right] = \left[\begin{matrix} 1 & 1 & 1 \\ 9 & 3 & 1 \\ 16 & 4 & 1 \end{matrix} \right. \left|\begin{matrix} {1.5} \\ {2} \\\ {1.5} \end{matrix} \right] \]Resolvido:
\[ \left[\begin{matrix} 1 & 0 &0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{matrix} \right. \left|\begin{matrix} {-0.25} \\ {1.25} \\\ {0.5} \end{matrix} \right] \]Com isso, nossa função ficaria:
\[P_2(x) = -0.25x^2 + 1.25x + 0.5\]Interpolação Polinomial
Podemos estender essa lógica para outros graus do polinômio interpolador
Exemplo
Dados os pontos:
| x | \( 1\) | \( 3\) | \( 4\) | \( 6\) |
|---|---|---|---|---|
| y | \(1.5\) | \(2\) | \(1.5\) | \(2\) |
O sistema linear:
\[\left[\begin{matrix} 1^3 & 1^2 & 1 & 1 \\ 3^3 & 3^2 & 3 & 1 \\ 4^3 & 4^2 & 4 & 1 \\ 6^3 & 6^2 & 6 & 1 \end{matrix} \right. \left|\begin{matrix} {1.5} \\ {2} \\ {1.5} \\ {2} \end{matrix} \right] = \left[\begin{matrix} 1 & 1 & 1 & 1 \\ 27 & 9 & 3 & 1 \\ 64 & 16 & 4 & 1 \\ 216 & 36 & 6 & 1 \end{matrix} \right. \left|\begin{matrix} {1.5} \\ {2} \\ {1.5} \\ {2} \end{matrix} \right] \]Resolvido:
\[ \left[\begin{matrix} 1 & 0 &0& 0 \\ 0 & 1 & 0& 0 \\ 0 & 0 & 1& 0 \\ 0 & 0 & 0& 1 \end{matrix} \right. \left|\begin{matrix} 0.1 \\ {-1.05} \\ {3.15} \\ {-0.7} \end{matrix} \right] \]Com isso, nossa função ficaria:
\[P_3(x) = 0.1^3 -1.05x^2 + 3.15x - 0.7\]Atividade 1
Dados os pontos a seguir, encontre a função de interpolação correspodente:
-
x \( -3\) \( 0\) y \(14\) \(-1\) -
x \( -10\) \( -5.25\) \( -0.25\) y \(-368\) \(-92.5\) \(2.5\) -
x \( -8\) \( -7\) \( -6.25\) \( -4\) y \(-1395\) \(-919\) \(-643.047\) \(-151\)