Evaluating numerical algorithm
Gauss-Legendre Quadrature is a remarkably accurate numerical integration technique. With just n strategically placed points, it integrates polynomials of degree up to exactly — making it far more efficient than Simpson's Rule or Trapezoidal for smooth functions.
where are Gauss nodes on [−1, 1] and are their corresponding weights.
| i | Node tᵢ | Weight wᵢ |
|---|---|---|
| 1 | −0.5773502692 | 1.0000000000 |
| 2 | +0.5773502692 | 1.0000000000 |
| i | Node tᵢ | Weight wᵢ |
|---|---|---|
| 1 | −0.7745966692 | 0.5555555556 |
| 2 | 0.0000000000 | 0.8888888889 |
| 3 | +0.7745966692 | 0.5555555556 |
Evaluate using 3-point Gauss-Legendre Quadrature. (Exact answer: )
Apply the transformation: and .
The 3-point Gauss rule gave the exact answer because is a degree-2 polynomial, which is within the degree-5 precision guarantee of the 3-point rule. For comparison, the Trapezoidal Rule would need many more subdivisions for the same accuracy.