Numerical Methods · Numerical Methods
Numerical Integration & Differentiation
Explanation
What is Numerical Integration?
When has no closed form — e.g., — we use numerical methods: divide into equal sub-intervals of width and approximate the integral with a formula.
Trapezoidal Rule — Degree-1 Interpolation
Between two points, approximate the integral by a trapezoid area:
Error: — order .
**Simpson's Rule — Degree-2 Interpolation**
Requires even . Fits a parabola over each pair of sub-intervals:
Error: — order .
Special property: Simpson's rule is exact for polynomials up to degree 3, despite being based on a parabola (degree 2).
Gaussian Quadrature
Unlike Newton-Cotes methods that use equally-spaced nodes, Gaussian quadrature optimizes both the node positions and weights for maximum accuracy:
2-point Gauss-Legendre rule:
This is exact for polynomials up to degree .
Change of interval:
Numerical Differentiation — Finite Differences
Forward difference (order ):
Central difference (order — more accurate):
Second derivative (order ):
**Choosing **: too small increases round-off error; too large increases truncation error. Balancing truncation error against round-off gives :
- Forward difference ():
- Central difference ():
When has no closed form — e.g., — we use numerical methods: divide into equal sub-intervals of width and approximate the integral with a formula.
Trapezoidal Rule — Degree-1 Interpolation
Between two points, approximate the integral by a trapezoid area:
Error: — order .
**Simpson's Rule — Degree-2 Interpolation**
Requires even . Fits a parabola over each pair of sub-intervals:
Error: — order .
Special property: Simpson's rule is exact for polynomials up to degree 3, despite being based on a parabola (degree 2).
Gaussian Quadrature
Unlike Newton-Cotes methods that use equally-spaced nodes, Gaussian quadrature optimizes both the node positions and weights for maximum accuracy:
2-point Gauss-Legendre rule:
This is exact for polynomials up to degree .
Change of interval:
Numerical Differentiation — Finite Differences
Forward difference (order ):
Central difference (order — more accurate):
Second derivative (order ):
**Choosing **: too small increases round-off error; too large increases truncation error. Balancing truncation error against round-off gives :
- Forward difference ():
- Central difference ():
Interactive Visualization
Loading visualization
Worked Examples
Practice
Exercise 1 of 6
1
Compute using the trapezoidal rule with single interval.
★Quiz
Test your knowledge from this lesson
A mix of questions from the lesson — each attempt varies slightly
Answer at least 4 out of 5 questions correctly to pass (70%)