Definitions

Relaxation method

In numerical mathematics, the relaxation method is a method for obtaining numerical approximations to the solutions of systems of equations, including certain types of elliptic partial differential equations, in particular Laplace's equation and its generalization, Poisson's equation. The function is assumed to be given on the boundary of a shape, and has to be computed on its interior.

This relaxation method should not be confused with the unrelated relaxation technique in mathematical optimization.

Sketch

When φ is a smooth real-valued function on the real numbers, its second derivative can be approximated by:
$frac\left\{d^2\right\}\left\{\left\{dx\right\}^2\right\}varphi\left(x\right) = h^\left\{-2\right\}left\left(varphi\left(x\left\{-\right\}h\right)-2varphi\left(x\right)+varphi\left(x\left\{+\right\}h\right)right\right),+,mathcal\left\{O\right\}\left(h^2\right),.$
Using this in both dimensions for a function φ of two arguments at the point (x, y), and solving for φ(x, y), results in:
$varphi\left(x, y\right) = tfrac\left\{1\right\}\left\{4\right\}left\left(varphi\left(x\left\{+\right\}h,y\right)+varphi\left(x,y\left\{+\right\}h\right)+varphi\left(x\left\{-\right\}h,y\right)+varphi\left(x,y\left\{-\right\}h\right)$
,-,h^2{nabla}^2varphi(x,y)right),+,mathcal{O}(h^4),. To approximate the solution of the Poisson equation:
$\left\{nabla\right\}^2 varphi = f,$
numerically on a two-dimensional grid with grid spacing h, the relaxation method assigns the given values of function φ to the grid points near the boundary and arbitrary values to the interior grid points, and then repeatedly performs the assignment φ := φ* on the interior points, where φ* is defined by:
$varphi^*\left(x, y\right) = tfrac\left\{1\right\}\left\{4\right\}left\left(varphi\left(x\left\{+\right\}h,y\right)+varphi\left(x,y\left\{+\right\}h\right)+varphi\left(x\left\{-\right\}h,y\right)+varphi\left(x,y\left\{-\right\}h\right)$
,-,h^2f(x,y)right),, until convergence.

The method, sketched here for two dimensions, is readily generalized to other numbers of dimensions.

Convergence and acceleration

While the method always converges, it does so very slowly. To speed up the computation, one can first compute an approximation on a coarser grid – usually the double spacing 2h – and use that solution with interpolated values for the other grid points as the initial assignment. This can then also be done recursively for the coarser computation.