Some of the formulas on this page are "pre-formatted". You may need to widen your browser window.
f(x-h) - 2 f(x) + f(x+h)
f''(x) = -------------------------- + O(h^2)
h^2
In particuar, this is a second order accurate approximation to f''(x) ---
the error goes to zero as O(h^2).
-U_(j-1) + 2 U_j - U_(j+1)
---------------------------- = f(x_j).
h^2
Note that for j = 1, the equation involves U_0, which is given by the boundary
condition, and is not an unknown.
| 2 -1 0 0 0 0 | |U_1| |f(x_1)|
|-1 2 -1 0 0 0 | |U_2| |f(x_2)|
| 0 -1 2 -1 0 0 | |U_3| |f(x_3)|
| 0 0 -1 2 -1 0 | * |U_4| = h^2 * |f(x_4)|.
| 0 0 0 -1 2 -1 | |U_5| |f(x_5)|
| 0 0 0 0 -1 2 | |U_6| |f(x_6)|
The tridiagonal structure of the matrix comes from the finite
difference approximation we have used, as do the matrix entries, -1, 2, -1.
[ -U_(j-1,k)+2 U_(j,k)-U_(j+1,k)]+[-U_(j,k-1)+2 U_(j,k)-U_(j,k+1)]
----------------------------------------------------------------- = f(x_j,y_k).
h^2
4 U_P - (U_S + U_W + U_E + U_N)
-------------------------------- = f_P
h^2
4 U_p - U_(p-nx) - U_(p-1) - U_(p+1) - U_(p+nx)
-------------------------------------------------- = f_p
h^2
| 4 -1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 |
| -1 4 -1 0 0 -1 0 0 0 0 0 0 0 0 0 0 |
| 0 -1 4 -1 0 0 -1 0 0 0 0 0 0 0 0 0 |
| 0 0 -1 4 0 0 0 -1 0 0 0 0 0 0 0 0 |
| -1 0 0 0 4 -1 0 0 -1 0 0 0 0 0 0 0 |
| 0 -1 0 0 -1 4 -1 0 0 -1 0 0 0 0 0 0 |
| 0 0 -1 0 0 -1 4 -1 0 0 -1 0 0 0 0 0 |
| 0 0 0 -1 0 0 -1 4 0 0 0 -1 0 0 0 0 |
| 0 0 0 0 -1 0 0 0 4 -1 0 0 -1 0 0 0 |
| 0 0 0 0 0 -1 0 0 -1 4 -1 0 0 -1 0 0 |
| 0 0 0 0 0 0 -1 0 0 -1 4 -1 0 0 -1 0 |
| 0 0 0 0 0 0 0 -1 0 0 -1 4 0 0 0 -1 |
| 0 0 0 0 0 0 0 0 -1 0 0 0 4 -1 0 0 |
| 0 0 0 0 0 0 0 0 0 -1 0 0 -1 4 -1 0 |
| 0 0 0 0 0 0 0 0 0 0 -1 0 0 -1 4 -1 |
| 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 -1 4 |
A theoretical and an empirical comparison of elliptic solvers.
| Complexity | |
|---|---|
| Jacobi | N^2 log(N) |
| Gauss-Seidel | N^2 log(N) |
| SOR | N^(1.5) log(N) |
| PCG | N^(1.5) |
| Sparse GE | N^(1.5) |
| Dense GE | N^3 |