Computational Physics Lectures: Numerical integration, from Newton-Cotes quadrature to Gaussian quadrature
Contents
Numerical Integration
Newton-Cotes Quadrature or equal-step methods
Basic philosophy of equal-step methods
Simple algorithm for equal step methods
Simple algorithm for equal step methods
Lagrange's interpolation formula
Polynomial approximation
Simplifying the integral
The trapezoidal rule
Global error
Error in the trapezoidal rule
Algorithm for the trapezoidal rule
Code example
Transfer of function names
Going back to Python, why?
Error analysis
Integrating numerical mathematics with calculus
The rectangle method
Truncation error for the rectangular rule
Second-order polynomial
Simpson's rule
Mathematical expressions for the truncation error
Algorithm for Simpson's rule
Summary for equal-step methods
Lagrange's polynomial
Polynomial approximation
Gaussian Quadrature
Gaussian Quadrature, main idea
Gaussian Quadrature
Gaussian Quadrature, weight function
Gaussian Quadrature weights and integration points
Gaussian Quadrature
Error in Gaussian Quadrature
Important polynomials in Gaussian Quadrature
Gaussian Quadrature, win-win situation
Gaussian Quadrature, determining mesh points and weights
Orthogonal polynomials, Legendre
Orthogonal polynomials, Legendre
Orthogonal polynomials, Legendre
Orthogonal polynomials, Legendre
Orthogonal polynomials, Legendre
Orthogonal polynomials, Legendre
Orthogonal polynomials, Legendre
Orthogonal polynomials, Legendre
Orthogonal polynomials, simple code for Legendre polynomials
Integration points and weights with orthogonal polynomials
Integration points and weights with orthogonal polynomials
Integration points and weights with orthogonal polynomials
Integration points and weights with orthogonal polynomials
Integration points and weights with orthogonal polynomials
Integration points and weights with orthogonal polynomials
Integration points and weights with orthogonal polynomials
Integration points and weights with orthogonal polynomials
Integration points and weights with orthogonal polynomials
Application to the case \( N=2 \)
Application to the case \( N=2 \)
Application to the case \( N=2 \)
Application to the case \( N=2 \)
Application to the case \( N=2 \)
General integration intervals for Gauss-Legendre
Mapping integration points and weights
Mapping integration points and weights
Other orthogonal polynomials, Laguerre polynomials
Other orthogonal polynomials, Laguerre polynomials
Other orthogonal polynomials, Laguerre polynomials
Other orthogonal polynomials, Laguerre polynomials
Other orthogonal polynomials, Hermite polynomials
Other orthogonal polynomials, Hermite polynomials
Demonstration of Gaussian Quadrature
Demonstration of Gaussian Quadrature, simple program
Demonstration of Gaussian Quadrature
Demonstration of Gaussian Quadrature
Comparing methods and using symbolic Python
Treatment of Singular Integrals
Treatment of Singular Integrals
Treatment of Singular Integrals, change of variables
Treatment of Singular Integrals, higher-order derivatives
Treatment of Singular Integrals
Treatment of Singular Integrals
Treatment of Singular Integrals
Treatment of Singular Integrals
Treatment of Singular Integrals
Treatment of Singular Integrals
Treatment of Singular Integrals
Treatment of Singular Integrals
Example of a multidimensional integral
Parts of code and brute force Gauss-Legendre quadrature
The function to integrate, code example
Laguerre polynomials
Laguerre polynomials, the new integrand
Laguerre polynomials, new integration rule: Gauss-Laguerre
Results with \( N=20 \) with Gauss-Legendre
Results for \( r_{\mathrm{max}}=2 \) with Gauss-Legendre
Results with Gauss-Laguerre
Results for \( r_{\mathrm{max}}=2 \) with Gauss-Legendre
\( N \)
Integral
Error
10
0.129834248
0.0629314631
16
0.167860437
0.0249052742
20
0.177065182
0.0157005292
26
0.183543237
0.00922247353
30
0.185795624
0.00697008738
«
1
...
86
87
88
89
90
91
92
93
94
95
»