Gauss Quadrature (also known as Gauss-Legendre) employs values positioned between the evaluation/measured points to achieve an improved estimate of the integral. If we can ‘balance’ the positive and negative errors between the straight line approximation and the curve, we can achieve a better estimate of the integral.
Provides exact values of integrals for polynomials up to degree (for n points). For example, 2 data points would be accurate for a polynomial up to degree .
Two-Point Gauss-Legendre Formula
Using the method of undetermined coefficients - the area (integral) can be approximated as:
where and are unknown coefficients, and and are fixed at the endpoints (4 unknowns requires 4 locations).
To develop 4 equations, we assume the 4 unknowns fit the
integrals of:
- Constant function ()
- Linear function ()
- Parabolic function ()
- Cubic function ()
Let’s go through these step by step.
Constant function:
Linear function:
Parabolic function:
Cubic function:
These can be solved as:
This yields:
A simple change of variable can be used to translate other limits of integration into this form. This is accomplished by assuming that a new variable is related to the original variable in a linear fashion, as in
The lower limit corresponds to , such that we have:
Similarly, the upper limit , corresponds to , such that:
These can then be solved with:
which results in:
which can in turn be differentiated to find:
Two-point Example
Integrate over the interval with two-point Gauss Quadrature.
We have:
where:
and
Thus:
Solving:
Higher-Order Gauss-Legendre
The general formulation is just:
Three-point Example
Integrate over the interval with 3-point Gauss Quadrature.
Thus, we have: