Week 12 - Numerical Integration (Open Formula and Improper Integrals)
Week 12 - Numerical Integration (Open Formula and Improper Integrals)
Week 12 - Numerical Integration (Open Formula and Improper Integrals)
Numerical Integration
where Z b
wi = Li (x)dx.
a
n=1
x2
3h3 ′′
Z
3h
f (x)dx = [f (x0 ) + f (x1 )] + f (ξ) where x−1 < ξ < x2 .
x−1 2 4
n=2
x3
14h5 (4)
Z
4h
f (x)dx = [2f (x0 ) − f (x1 ) + 2f (x2 )] + f (ξ)
x−1 3 45
where x−1 < ξ < x3 .
n=3
Z x4
5h
f (x)dx = [11f (x0 ) + f (x1 ) + f (x2 ) + 11f (x3 )]
x−1 24
95 5 (4)
+ h f (ξ) where x−1 < ξ < x4 .
144
10
8
y-axis
0
−1 0 1 2 3
Numerical Analysis I First Semester, AY 2023-2024 6 / 15
Improper Integrals with Left Endpoint Singularity
where 0 < p < 1 and g is continuous on [a, b], then the improper integral
Z b
f (x)dx
a
also exists. We will approximate the integral using the Composite Simpson’s
rule, provided that g ∈ C 5 [a, b]. In this case, we can use the fourth Taylor
polynomial, P4 (x), for g about a,
4
X g (n) (a)(x − a)n
P4 (x) =
n!
n=0
Integrating the second term of the right side of the equation is relatively
easy since it only involves a polynomial. To approximate the integral of f ,
we must add to this value the approximation of
b
g (x) − P4 (x)
Z
dx.
a (x − a)p
This can be done by applying the Composite Simpson’s rule to the function
( g (x)−P (x)
4
(x−a)p , if a < x ≤ b,
G (x) =
0, if x = a.
We can also use the techniques for improper integrals with left endpoint
singularity to deal with improper integrals with right endpoint singularity.
To do this, suppose that we want to find
Z b
f (x)dx
a
z = −x, dz = −dx
so that Z b Z −a
f (x) = f (−z)dz,
a −b
which has a singularity at the left endpoint.
−4 −3 −2 −1
1 2 3 4
R∞
Similarly, if we let t = x −1 , the improper integral a f (x)dx into
Z 1
a 1
t −2 f ( )dt
0 t