Método do Ponto Fixo para Sistemas de 2 Equações e 2 Variáveis
O método do ponto fixo é uma técnica iterativa para resolver sistemas de equações não lineares da forma:
\[ \begin{cases} f_1(x, y) = 0 \\ f_2(x, y) = 0 \end{cases} \]Formulação do Método
Reescrevemos o sistema na forma equivalente:
\[ \begin{cases} x = g_1(x, y) \\ y = g_2(x, y) \end{cases} \]Algoritmo Iterativo
- Escolha \( (x_0, y_0) \) inicial
- Para \( k = 0, 1, 2, \ldots \), calcule: \[ \begin{cases} x_{k+1} = g_1(x_k, y_k) \\ y_{k+1} = g_2(x_k, y_k) \end{cases} \]
- Pare quando \( \|(x_{k+1}, y_{k+1}) – (x_k, y_k)\| < \epsilon \)
Critério de Convergência
Seja \( \mathbf{g} = (g_1, g_2) \) e \( \mathbf{J_g} \) sua matriz Jacobiana. Se \( \|\mathbf{J_g}\| < 1 \) numa vizinhança da solução \( \mathbf{p} \), então o método converge para \( \mathbf{p} \).
\[ \mathbf{J_g} = \begin{bmatrix} \frac{\partial g_1}{\partial x} & \frac{\partial g_1}{\partial y} \\ \frac{\partial g_2}{\partial x} & \frac{\partial g_2}{\partial y} \end{bmatrix} \]Exemplo Numérico
Resolver o sistema não linear:
\[ \begin{cases} x = \frac{1}{2}\cos y \\ y = \frac{1}{2}\sin x \end{cases} \]Com \( (x_0, y_0) = (0.5, 0.5) \) e \( \epsilon = 10^{-4} \):
| \( k \) | \( x_k \) | \( y_k \) |
|---|---|---|
| 0 | 0.500000 | 0.500000 |
| 1 | 0.438791 | 0.239713 |
| 2 | 0.485624 | 0.233827 |
| … | … | … |
| 10 | 0.483937 | 0.232925 |
Implementação em Python
import numpy as np
def fixed_point_2d(g1, g2, x0, y0, tol=1e-6, max_iter=100):
x, y = x0, y0
for _ in range(max_iter):
x_new = g1(x, y)
y_new = g2(x, y)
if np.linalg.norm([x_new-x, y_new-y]) < tol:
return x_new, y_new
x, y = x_new, y_new
return x, y
# Exemplo de uso:
# solution = fixed_point_2d(lambda x,y: 0.5*np.cos(y),
# lambda x,y: 0.5*np.sin(x), 0.5, 0.5)
Análise de Convergência
Para o exemplo dado, a matriz Jacobiana é:
\[ \mathbf{J_g} = \begin{bmatrix} 0 & -\frac{1}{2}\sin y \\ \frac{1}{2}\cos x & 0 \end{bmatrix} \]Na solução aproximada \( (0.4839, 0.2329) \), temos \( \|\mathbf{J_g}\| \approx 0.24 < 1 \), garantindo convergência.
Veja e teste o algoritmo em JS ou leia mais sobre este assunto clicando aqui.