Maclaurin’s series 73
8.5 Numerical integration using
Maclaurin’s series
The value of many integrals cannot be determined using
the various analytical methods. In Chapter 45, the trape-
zoidal, mid-ordinate and Simpson’s rules are used to
numerically evaluate such integrals. Another method of
finding the approximate value of a definite integral is to
express the functionas a power series usingMaclaurin’s
series, and then integrating each algebraic term in turn.
This is demonstrated in thefollowingworked problems.
As a reminder, the general solutionof integrals of the
form
∫
axndx,whereaandnare constants, is given by:
∫
axndx=
axn+^1
n+ 1
+c
Problem 13. Evaluate
∫ 0. 4
0. 1 2e
sinθdθ, correct to
3 significant figures.
A power series for esinθis firstly obtained usingMaclau-
rin’s series.
f(θ )=esinθ f( 0 )=esin 0=e^0 = 1
f′(θ )=cosθesinθ f′( 0 )=cos 0esin0=( 1 )e^0 = 1
f′′(θ )=(cosθ)(cosθesinθ)+(esinθ)(−sinθ),
by the product rule,
=esinθ(cos^2 θ−sinθ);
f′′( 0 )=e^0 (cos^20 −sin0)= 1
f′′′(θ )=(esinθ)[(2cosθ(−sinθ)−cosθ)]
+(cos^2 θ−sinθ)(cosθesinθ)
=esinθcosθ[−2sinθ− 1 +cos^2 θ−sinθ]
f′′′( 0 )=e^0 cos0[( 0 − 1 + 1 − 0 )]= 0
Hence from equation (5):
esinθ=f( 0 )+θf′( 0 )+
θ^2
2!
f′′( 0 )+
θ^3
3!
f′′′( 0 )+···
= 1 +θ+
θ^2
2
+ 0
Thus
∫ 0. 4
0. 1
2esinθdθ=
∫ 0. 4
0. 1
2
(
1 +θ+
θ^2
2
)
dθ
=
∫ 0. 4
0. 1
( 2 + 2 θ+θ^2 )dθ
=
[
2 θ+
2 θ^2
2
+
θ^3
3
] 0. 4
0. 1
=
(
0. 8 +( 0. 4 )^2 +
( 0. 4 )^3
3
)
−
(
0. 2 +( 0. 1 )^2 +
( 0. 1 )^3
3
)
= 0. 98133 − 0. 21033
= 0. 771 ,correct to 3 significant figures.
Problem 14. Evaluate
∫ 1
0
sinθ
θ
dθusing
Maclaurin’s series, correct to 3 significant figures.
Let f(θ )=sinθ f( 0 )= 0
f′(θ )=cosθ f′( 0 )= 1
f′′(θ )=−sinθ f′′( 0 )= 0
f′′′(θ )=−cosθ f′′′( 0 )=− 1
fiv(θ )=sinθ fiv( 0 )= 0
fv(θ )=cosθ fv( 0 )= 1
Hence from equation (5):
sinθ=f( 0 )+θf′( 0 )+
θ^2
2!
f′′( 0 )+
θ^3
3!
f′′′( 0 )
+
θ^4
4!
fiv( 0 )+
θ^5
5!
fv( 0 )+···
= 0 +θ( 1 )+
θ^2
2!
( 0 )+
θ^3
3!
(− 1 )
+
θ^4
4!
( 0 )+
θ^5
5!
( 1 )+···
i.e. sinθ=θ−
θ^3
3!
+
θ^5
5!
−···
Hence
∫ 1
0
sinθ
θ
dθ
=
∫ 1
0
(
θ−
θ^3
3!
+
θ^5
5!
−
θ^7
7!
+···
)
θ
dθ
=
∫ 1
0
(
1 −
θ^2
6
+
θ^4
120
−
θ^6
5040
+···
)
dθ