In numerical analysis and scientific computing, the Gauss–Legendre methods are a family of numerical methods for ordinary differential equations.
More specifically, they are collocation methods based on the points of Gauss–Legendre quadrature.
The Gauss–Legendre method based on s points has order 2s.
[2] The Gauss–Legendre method of order two is the implicit midpoint rule.
Its Butcher tableau is: The Gauss–Legendre method of order four has Butcher tableau: The Gauss–Legendre method of order six has Butcher tableau: The computational cost of higher-order Gauss–Legendre methods is usually excessive, and thus, they are rarely used.
[3] Gauss-Legendre Runge-Kutta (GLRK) methods solve an ordinary differential equation
The distinguishing feature of GLRK is the estimation of
with Gaussian quadrature.
are the sampled velocities,
are the quadrature weights,
of the Legendre polynomial of degree
A further approximation is needed, as
is still impossible to evaluate.
To maintain truncation error of order
The Runge-Kutta implicit definition
This is an implicit constraint that must be solved by a root finding algorithm like Newton's method.
The values of the Runge-Kutta parameters
can be determined from a Taylor series expansion in
The Gauss-Legendre methods are implicit, so in general they cannot be applied exactly.
Instead one makes an educated guess of
, and then uses Newton's method to converge arbitrarily close to the true solution.
Below is a Matlab function which implements the Gauss-Legendre method of order four.
This algorithm is surprisingly cheap.
The only extra work compared to explicit Runge-Kutta methods is the computation of the Jacobian.
At the cost of adding an additional implicit relation, these methods can be adapted to have time reversal symmetry.
In these methods, the averaged position
in standard Runge-Kutta methods.
The method of order 2 is just an implicit midpoint method.
The method of order 4 with 2 stages is as follows.
The method of order 6 with 3 stages is as follows.