CE7453: Numerical Differentiation and Integration

3 minute read

Published:

This post summarizes key concepts of numerical differentiation and integration covered in CE7453, based on the lecture notes “06-Diff-Integ”.

Key Concepts

Numerical differentiation and integration are techniques to approximate derivatives and integrals when analytical solutions are difficult or impossible to obtain. These methods are fundamental to solving differential equations and evaluating complex integrals in engineering applications.

Numerical Differentiation

1. Finite Difference Methods

  • Forward Difference: f’(x) ≈ [f(x+h) - f(x)]/h
    • Error: O(h)
  • Backward Difference: f’(x) ≈ [f(x) - f(x-h)]/h
    • Error: O(h)
  • Central Difference: f’(x) ≈ [f(x+h) - f(x-h)]/(2h)
    • Error: O(h²)
  • Higher Order Differences:
    • Second Derivative: f’‘(x) ≈ [f(x+h) - 2f(x) + f(x-h)]/h²
    • Error: O(h²)

2. Richardson Extrapolation

  • Concept: Combining approximations with different step sizes
  • Formula: f’(x) ≈ [4D(h/2) - D(h)]/3 where D(h) is a central difference with step h
  • Advantage: Improves accuracy (Error: O(h⁴) for central differences)

3. Derivative from Interpolation

  • Approach: Differentiate an interpolating polynomial
  • Methods:
    • Differentiate Lagrange polynomials
    • Differentiate spline functions
  • Advantage: Higher accuracy for smooth functions

4. Error Analysis

  • Truncation Error: From Taylor series truncation
  • Round-off Error: From finite precision arithmetic
  • Optimal Step Size: Balance between truncation and round-off errors
  • Ill-conditioning: Differentiation amplifies errors in the function values

Numerical Integration (Quadrature)

1. Newton-Cotes Formulas

  • Trapezoidal Rule: ∫ab f(x)dx ≈ (b-a)[f(a) + f(b)]/2
    • Error: O(h³)
  • Simpson’s 1/3 Rule: ∫ab f(x)dx ≈ (b-a)[f(a) + 4f((a+b)/2) + f(b)]/6
    • Error: O(h⁵)
  • Simpson’s 3/8 Rule: Uses four points
    • Error: O(h⁵)
  • Boole’s Rule: Uses five points
    • Error: O(h⁷)

2. Composite Integration

  • Composite Trapezoidal: Divides interval into subintervals
    • Formula: (h/2)[f(x₀) + 2Σi=1n-1f(xi) + f(xn)]
    • Error: O(h²)
  • Composite Simpson’s:
    • Formula: (h/3)[f(x₀) + 4Σi oddf(xi) + 2Σi evenf(xi) + f(xn)]
    • Error: O(h⁴)

3. Adaptive Quadrature

  • Concept: Adjust step size based on function behavior
  • Implementation:
    • Estimate error for an interval
    • Subdivide intervals with large errors
    • Apply recursively until desired accuracy

4. Gaussian Quadrature

  • Form: ∫ab f(x)dx ≈ Σi=1n wif(xi)
  • Nodes: Zeros of orthogonal polynomials (Legendre, Chebyshev)
  • Weights: Derived to maximize accuracy
  • Accuracy: Exactly integrates polynomials of degree up to 2n-1
  • Variants: Gauss-Legendre, Gauss-Chebyshev, Gauss-Laguerre, Gauss-Hermite

5. Improper Integrals

  • Infinite Limits: Transform or truncate
  • Singular Integrands: Change of variables or special techniques
  • Oscillatory Integrands: Special methods like Filon’s method

Multidimensional Integration

  • Iterated Integration: Apply 1D methods recursively
  • Product Rules: Extend 1D formulas to multiple dimensions
  • Monte Carlo Methods: Statistical sampling approaches
    • Advantage: Efficiency for high dimensions
    • Error: O(1/√N) where N is number of samples

Error Analysis and Convergence

  • Absolute Error:I - In
  • Relative Error:I - In/I
  • Convergence Orders: How error decreases with step size
  • Extrapolation: Richardson extrapolation to improve accuracy

Exam Focus Areas

  1. Method Selection: Choose appropriate differentiation/integration methods
  2. Error Analysis: Determine and compare error bounds
  3. Implementation Details: Steps for implementing each method
  4. Composite Formulas: Applying methods over subintervals
  5. Adaptive Techniques: When and how to apply adaptive methods

Practice Problems

  1. Approximate derivatives using different finite difference formulas
  2. Compare errors from different quadrature rules for a specific integral
  3. Implement composite Simpson’s rule for a given function
  4. Apply Gaussian quadrature to evaluate an integral and analyze error

Original lecture notes are available at: /files/CE7453/CE7453/06-Diff-Integ-4slides1page(1).pdf