Numerical Integration
Learn to approximate definite integrals using quadrature formulas. From basic trapezoidal and Simpson rules to advanced Gaussian quadrature, master the tools for numerical calculus.
- Derive and apply Newton-Cotes quadrature formulas
- Understand algebraic precision and error analysis
- Construct composite quadrature rules for improved accuracy
- Apply Richardson extrapolation and Romberg integration
- Master Gaussian quadrature for optimal accuracy
- Choose appropriate methods for different integration problems
1. Newton-Cotes Formulas
Newton-Cotes formulas approximate integrals by integrating an interpolating polynomial through equally-spaced nodes.
Definition 4.1: Trapezoidal Rule
Using linear interpolation through and :
Theorem 4.1: Trapezoidal Rule Error
If , the error is:
The trapezoidal rule has algebraic precision 1.
Definition 4.2: Simpson's Rule
Using quadratic interpolation through three points:
Theorem 4.2: Simpson's Rule Error
If , the error is:
Simpson's rule has algebraic precision 3 (not 2, due to symmetry).
Definition 4.3: General Newton-Cotes Formula
Divide into equal parts with nodes , :
where are the Newton-Cotes coefficients.
Example: Newton-Cotes Coefficients
| Name | Coefficients | Precision | |
|---|---|---|---|
| 1 | Trapezoidal | 1 | |
| 2 | Simpson | 3 | |
| 3 | Simpson's 3/8 | 3 | |
| 4 | Boole | 5 |
Remark:
For even , Newton-Cotes formulas achieve precision instead of just due to symmetry of the nodes and weights.
2. Composite Quadrature Rules
High-degree Newton-Cotes formulas can have negative coefficients and instability. Instead, apply low-degree rules on subintervals.
Definition 4.4: Composite Trapezoidal Rule
Divide into equal parts with :
Theorem 4.3: Composite Trapezoidal Error
If :
Definition 4.5: Composite Simpson's Rule
Divide into equal parts:
Theorem 4.4: Composite Simpson Error
If :
Note:
Successive halving: From to :
This avoids recomputing function values at existing nodes.
3. Romberg Integration
Richardson extrapolation systematically eliminates error terms from the trapezoidal rule.
Definition 4.6: Richardson Extrapolation
If approximates with error , then:
approximates with error where .
Theorem 4.5: Romberg Formula
With for successive halving:
where is the trapezoidal rule with subintervals.
Example: Romberg Table
The Romberg table structure (each column has higher accuracy):
Note: (Simpson), and has error .
4. Gaussian Quadrature
By choosing both nodes and weights optimally, Gaussian quadrature achieves the maximum possible precision with function evaluations.
Definition 4.7: Gaussian Quadrature
A quadrature formula is Gaussian if it has algebraic precision .
Theorem 4.6: Gauss-Legendre Nodes
For , the optimal nodes are the zeros of the Legendre polynomial .
The weights are:
Example: Gauss-Legendre Nodes and Weights
| Nodes | Weights | |
|---|---|---|
| 1 | ||
| 2 | ||
| 3 |
Gauss-Laguerre
For , nodes are zeros of Laguerre polynomials.
Gauss-Hermite
For , nodes are zeros of Hermite polynomials.
Gauss-Chebyshev
For , nodes are zeros of Chebyshev polynomials.
Note:
To integrate over instead of , use the transformation.
Practice Quiz
Frequently Asked Questions
When should I use Simpson's rule vs. Gaussian quadrature?
Simpson's rule: Good for smooth functions when you can choose equally-spaced evaluation points. Easy to implement with adaptive refinement.
Gaussian quadrature: Better accuracy with fewer function evaluations, but nodes are not equally spaced. Ideal when function evaluations are expensive.
Why does Simpson's rule have precision 3 instead of 2?
Due to symmetry! The error term for degree-3 polynomials vanishes because the nodes and weights are symmetric about the midpoint. This "bonus" precision occurs for all even-order Newton-Cotes formulas.
How do I handle improper integrals?
Options include:
- Variable transformation to remove singularity
- Gauss-Laguerre for with exponential decay
- Gauss-Hermite for with Gaussian weight
- Truncation with error estimation
What's the advantage of Romberg integration?
Romberg integration reuses function values from coarser grids, achieving high accuracy efficiently. It automatically produces error estimates by comparing successive approximations, enabling adaptive termination.
Why not always use the highest-degree Newton-Cotes formula?
High-degree Newton-Cotes formulas (n ≥ 8) have negative coefficients, causing potential cancellation errors. They can also be unstable.
Composite low-degree rules or Gaussian quadrature are preferred for accuracy and stability.