Tricki
a repository of mathematical know-how

Make your method keep the symmetries of the problem

Quick description

Making your method keep the symmetries of the problem means that it is immune to errors that break symmetries. This can have two important effects:

  • reducing the errors in the results, and particularly eliminating entire classes of errors that have unphysical or otherwise harmful effects,

  • and reducing the amount of computational work.

Prerequisites

Linear algebra, calculus.

Example 1

For symmetric positive definite matrices, use the Cholesky factorization rather than the LU factorization.

The LU factorization of a matrix is A=LU, while the Cholesky factorization is A=LL^T where in each case L is lower triangular and U is upper triangular. Using the Cholesky factorization (which preserves the symmetry of A) roughly halves the time to compute the factorization, and avoids the problems of swapping rows and/or columns of A to preserve numerical stability.

Example 2

Use symplectic methods to solve Hamiltonian differential equations.

A Hamiltonian differential equation has the form

 \frac{dz}{dt} = J\,\nabla H(z)

where J=\left[\begin{array}{cc}0&I\\ -I&0\end{array}\right]. Symplectic methods preserve the two-form \sum_i dq_i \wedge dp_i where z^T = [p^T,\, q^T]. Such methods also nearly preserve a "numerical energy" function (which depends on the step-size), and are much better for long-time integration of mechanical systems such as arise in celestial mechanics.

General discussion