Numerical Integration
Numerical Integration
Computational Electromagnetics :
Numerical Integration
Uday Khankhoje
2 Interpolating a Function
Table of Contents
2 Interpolating a Function
Rh
Now, 0 f (x) dx =
Rectangle
Trapezoidal
Table of Contents
2 Interpolating a Function
Interpolating a function
Many functions we want to integrate can’t be done analytically.
• What can be done? Weierstrass Approximation Theorem:
If f is a continuous real-valued function on [a, b] and if any > 0 is given, then
there exists a polynomial p on [a, b] such that |f (x) − p(x)| < for all x ∈ [a, b].
• Fn known at few points – interpolate a polynomial fn: 2, 3, . . . , N
Lagrange polynomials
6/11
Table of Contents
2 Interpolating a Function
Rb
1. Construct a polynomial pN (x) (order N ) s.t. a xk pN (x) dx = 0, k ∈ [0, N − 1]
Exact calculation
2 Interpolating a Function