Professional Documents
Culture Documents
Chapter 11
Simpson’s
Rule
At the end of this chapter, students should be able to:
State Simpson 1/3 and 3/8 rules
Identify and apply Simpson 1/3 and 3/8 rules
Determine error involved in Simpson 1/3 and 3/8 rules
11.1 Introduction
Notice that in Riemann sum the area under a curve is being approximated by
a constant function y = c while trapezoidal rule used a linear function
y = ax + b (Figure 11.1).
y y
y1 y1
y2 y0 y2
y0 y3 y3
y4
y4
h h h h h h h h
a b x a b x
Figure 11.1
Is it possible to do the approximation by using a quadratic function,
167
Part 6 NUMERICAL INTEGRATION MAT 575
b
discussion will be focusing on estimating a definite integral f ( x ) dx with a
a
polynomial or a curve.
y = f(x)
0 a b
Figure 11.2
Simpson’s Rule uses the area under that parabola as an approximation for
the value of the area under the curve y = f(x) i.e.
b x1 h
f ( x) dx ax
2
bx c dx 1
a x1 h
y ax2 bx c
168
Part 6 NUMERICAL INTEGRATION MAT 575
0 a b
Figure 11.3
x1 h
2
ax bx c dx
a
x1 h3 x1 h3 b x1 h2 x1 h2
x1 h 3 2
cx1 h x1 h
which simplifies to
x1 h
2
ax bx c dx
h
3
2a x1 h2 x1 hx1 h x1 h2 3b2x1 6c
x1 h
From (1),
b h
f ( x) dx (y0 4y1 y2 )
a 3
y = f(x)
0 a b
Figure 11.4
The area under the parabola through y 0 , y1, y 2 is
h
(y + 4y1 + y 2 )
3 0
and the area under the parabola through y 2 , y 3 , y 4 is
169
Part 6 NUMERICAL INTEGRATION MAT 575
h
(y + 4y 3 + y 4 )
3 2
i.e. 5 ordinates (or 4 subintervals), Simpson’s 1/3 rule is
b h
f ( x ) dx (y0 4y1 2y2 4y3 y 4 ) .
a 3
0 a b
Figure 11.5
This argument can be extended to cover any even number of subintervals (or
any odd number of ordinates). Hence, Simpson’s rule with (2k + 1) ordinates
is
b h
f ( x) dx (y0 4y1 2y2 4y3 ... 2y2k -2 4y2k -1 y2k )
a 3
Note that the use of Simpson’s rule requires an odd number of ordinates. For
easy computation, the ordinates used can be arranged in the form
b h 2k 2k -2
f ( x) dx (y0 y2k 4 ∑ y2r -1 ... 2 ∑ y2r )
a 3 r 1 r 1
Example 1
Use Simpson’s rule with five ordinates to find an approximate value for
sin d
0
170
Part 6 NUMERICAL INTEGRATION MAT 575
x^2
Solution
10
5 x^2
0
1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3
f ( ) sin
Identify the step size or number of subintervals; h or n
n4
and
ba
h
n
0
4 4
Apply the Simpson 1/3 rule
171
Part 6 NUMERICAL INTEGRATION MAT 575
h
S1 / 3 (y0 4y1 2y2 4y3 y 4 )
3
8.7272
12
2.2848
Example 2
1 1
Estimate the integral dx to 3 decimal places using five ordinates by
2
0 1 x
applying :
Solution
172
Part 6 NUMERICAL INTEGRATION MAT 575
1
1
dx
h
f0 2f1 2f2 2f3 f4
0 1 x2 2
0.25
6.2624
2
0.7828 0.783
(b) Simpson’s 1/3 rule
x f(x) coef coef x f(x)
0.0000 1.0000 1 1.0000
0.2500 0.9412 4 3.7647
0.5000 0.8000 2 1.6000
0.7500 0.6400 4 2.5600
1.0000 0.5000 1 0.5000
9.4247
1
1
dx
h
f0 4f1 2f2 4f3 f4
0 1 x2 3
0.25
9.4247
3
0.7854 0.785
The exact solution correct to 3 decimal places is 0.785.
Example 3
The following points were found empirically.
x 2.1 2.4 2.7 3.0 3.3 3.6 3.9
y 2.5 2.8 3.0 3.3 3.6 3.9 4.1
3 .9
Use the Simpson’s 1/3 rule to estimate y dx .
2 .1
Solution
Note that the interval is [2.1, 3.9] while the step size; h = 0.3 and the
number of ordinates are 7. Therefore,
3.9
y dx
0.3
2.5 42.8 3.3 3.9 2(3.0 3.6) 4.1
2.1 3
6.39
173
Part 6 NUMERICAL INTEGRATION MAT 575
Warm up exercise
2 1
Consider the definite integral dx and divide the interval into 6
0 1 cos x
subintervals.
(i) Identify the interval.
(ii) Identify the step size.
(iii) Identify the function.
(iv) Approximate the definite integral above using Simpson’s 1/3 rule with
7 ordinates.
( b a )5 ( 4 )
Ea f ()
180n 4
f
( 4)
( x ) dx
f ( 4 ) () a
ba
174
Part 6 NUMERICAL INTEGRATION MAT 575
Theorem
Suppose that f iv ( x) exists on [a,b]. Then for n a positive integer,
b
f ( x ) dx Sn En
a
where
h 2k 2k - 2
S1/ 3 f(x ) f(x ) 4 ∑ f(x ) ... 2 ∑ f(x )
3
0 2k 2r -1 2r
r 1 r 1
and the error En is given by
( b a )5 ( 4 )
En f ()
180n 4
for some point in [a, b].
Notice that the exponent here is 4, while it was 2 for the trapezoid rule. This
tells us that for a fixed n, Simpson's rule should give us approximately twice
as many decimal places correct.
Example 4
Simpson’s 1/3 rule with 4 subintervals is used to approximate the integral
1 1
dx , determine:
0 1 x
175
Part 6 NUMERICAL INTEGRATION MAT 575
Solution
(a)
Identify the interval; [a, b]
[0, 1]
Identify the given information.
n4
Identify the function
1 x 1
1
f ( x)
1 x
(b a)5 ( 4 )
Ea f ()
180n 4
(1 0)5
5.625
180( 4)4
1.2207 x 10 4
0.1221x 10 3
176
Part 6 NUMERICAL INTEGRATION MAT 575
S1/ 3
1
8.3190
12
0.6933
Exact definite integral is
1 1
dx ln 2 0.6931
0 1 x
Example 5
41
The approximation for the integral dx by Simpson’s rule is accurate to
1x
within 0.005. How large must n be?
Solution
The interval for the definite integral is [1, 4] and the approximated error is
1
at least 0.005 while the function is f ( x ) . Hence,
x
177
Part 6 NUMERICAL INTEGRATION MAT 575
and
b
iv
f ( x ) dx
f iv ( ) a
ba
4
24x
5
dx
1
3
4
6
4
x 1
3
6
6
4
4
3
1.9922
In order to achieve the required accuracy the number of subintervals
needed are
(b a)5 ( 4 )
f ( ) 0.005
180n 4
( 4 1)5
n4 1.9922
180(0.005)
537.85
n 4.8159
Example 6
1 2
If the Simpson’s 1/3 rule is to be used to compute e x dx with an error
0
of at most 0.5 x 10-4, how many points are needed?
Solution
Note that the interval for the definite integral f ( x ) e x is [0, 1] and the
2
178
Part 6 NUMERICAL INTEGRATION MAT 575
1
f iv ( ) 12xe x 8 x 3 e x
2 2
0
12e 1 8e 1 0
1.4715
(1 0)5 ( 4 )
f ( ) 0.5 x 10 4
4
180n
n 4 163.5
n 3.5759
Therefore at least 5 points are needed to obtain an error of at most
0.5 104.
Warm up exercise
3
Assume ln x dx is being estimated by Simpson’s 1/3 rule with 5 ordinates.
1
The theorem below can be used to determine the bound of maximum error
b
when Simpson’s 1/3 rule is applied to approximate a definite integral f ( x ) dx .
a
Theorem
If f iv ( x) is continuous in [a, b], then the error in the Simpson’s 1/3 rule ES
satisfies
Mb a5
Es ,
180n4
179
Part 6 NUMERICAL INTEGRATION MAT 575
b 3h
f ( x ) dx (y0 3y1 3y2 2y3 3y 4 3y5 2y6
a 8
... 2y3k -3 3y3k - 2 3y3k -1 y3k )
Example 7
0.9 1
Estimate dx to 4 decimal places using Simpson’s 3/8 with 4
0 1 x2
ordinates.
Solution
Identify the interval;
[0, 0.9]
Identify the function;
1
f ( x)
1 x2
180
Part 6 NUMERICAL INTEGRATION MAT 575
3(0.3)
6.5107
8
0.7325
Example 8
1
x
Apply Simpson’s 3/8 rule to estimate e cos 4x dx using six
0
subintervals.
Solution
181
Part 6 NUMERICAL INTEGRATION MAT 575
3h
S3 / 8 (y0 3y1 3y2 2y3 3y 4 3y5 y 6 )
8
1
3
7.0785
6
8
0.4424
Example 9
A tree trunk is 120 meter long. At a distance x meter from one end, its
sectional area A is given in square meter by the following table at intervals
of 20 meters:
L 0 20 40 60 80 100 120
A 120 124 128 130 132 136 144
Solution
From calculus course it is stated that :
b
Volume Area( x) dx
a
In this problem the area are given in tabulated values instead of a function.
The interval is given from 0 to 120 meters. Hence, the volume of the tree
trunk estimated with Simpson’s 3/8 rule is
3(20)
2084 15630 m3
8
182
Part 6 NUMERICAL INTEGRATION MAT 575
Warm up exercise
2 1
Consider the definite integral dx and divide the interval into 6
0 1 cos x
subintervals.
(i) Identify the interval.
(ii) Identify the step size.
(iii) Identify the function.
(iv) Approximate the definite integral above using Simpson’s 1/3 rule with
7 ordinates.
Surprisingly, the Simpson’s 3/8 rule is often less accurate than 1/3 rule.
(b a)h 4 ( 4)
Ea f ()
80
where
b
f
( 4)
( x ) dx
f ( 4 ) () a
ba
183
Part 6 NUMERICAL INTEGRATION MAT 575
Theorem
Suppose that f iv ( x) exists on [a,b]. Then for n a positive integer,
b
f ( x ) dx Sn En
a
where
3h
S3 / 8 (y0 3y1 3y2 2y3 3y 4 3y5 2y6
8
... 2y3k -3 3y3k - 2 3y3k -1 y 3k )
and the error En is given by
(b a)h 4 ( 4)
Ea f ()
80
for some point in [a, b].
Example 10
1.1
If Simpson’s 3/8 rule is to be used to compute 2 ln x x dx with step size
0.2
h = 0.15, determine:
(a) the estimated error.
(b) the estimated subintervals.
(c) the estimated integral.
184
Part 6 NUMERICAL INTEGRATION MAT 575
Solution
(a)
Identify the interval; [a, b]
[0.2, 1]
Identify the given information; h
h 0.15
2 4
f ' (x) 1 f ' ' ' (x)
x x3
2 12
f ' ' x f iv x
2
x x4
Compute the average value of the fourth derivatives;
b
4
f ( x ) dx
f 4 ( ) a
ba
1 12
dx
x4
0 .2
1 0 .2
1
1 4
0.8 x 3 0.2
620
(b a)h 4 ( 4 )
Ea f ()
80
1 0.20.154 620
80
0.80.154 620
80
0.0031
0.3 x10 2
Hence, it can be concluded that with h = 0.15, Simpson’s 3/8 rule is
accurate up to two decimal places.
185
Part 6 NUMERICAL INTEGRATION MAT 575
Since Simpson’s 3/8 rule is used then at least 6 subintervals are required.
Example 11
Find the minimum number of ordinates needed in order for the
4 2
approximation of the integral dx by Simpson’s 3/8 accurate to within
1 x 1
0.005.
Solution
Ea 0.005
0.7308
186
Part 6 NUMERICAL INTEGRATION MAT 575
(b a)h 4 ( 4 )
f ( ) 0.005
80
ba 3
n
h 0.1824
16.4473
Example 12
1
If the Simpson’s 3/8 rule is to be used to compute e x cos 4x dx with
0
an error of at most 0.5 x 10-4, how many subintervals are needed?
Solution
Given x 0,1 , f ( x) ex cos 4x and error of at most 0.5 x 10-4. Hence,
1
f iv ( x) e x 64 sin 4x 0 47.8032
(b a)h 4 ( 4 )
f ( ) 0.00005
80
h4
0.0000580
47.8032
8.3676 x 105
h 0.0956
ba
and n
h
187
Part 6 NUMERICAL INTEGRATION MAT 575
n 10.4603
In order to have an error of at most 0.5 x 10-4, 12 subintervals are required.
Example 13
Find the minimum number of ordinates needed in order for the
3
approximation of the integral e x sin x dx by Simpson’s 3/8 accurate to
0
within 0.005.
Solution
Given x 0, , f ( x) ex sin x and approximated error is 0.005. Hence,
3
f 4 (x)
x x
3 2e cos x 2e sin x 03
3 3
2e cos sin 21
3 3
3.9019
(b a)h 4 ( 4 )
f ( ) 0.005
80
4
h 3.9019
3 0.005
80
30.00580
h4
3.9019
0.0979
h 0.5594
ba
h
n 3n
n 1.872
Therefore, based on the error approximation 3 subintervals are needed.
188
Part 6 NUMERICAL INTEGRATION MAT 575
The theorem below can be used to determine the bound of maximum error
when Simpson’s 3/8 rule is applied to approximate a definite integral
b
f ( x ) dx .
a
Theorem
If f iv ( x) is continuous in [a, b], then the error in the Simpson’s 3/8 rule ES
satisfies
Mb a5
Es ,
180n4
Warm up exercise
3
Assume ln x dx is being estimated by Simpson’s 3/8 rule with 6 subintervals.
1
Exercise 11
1. Use the Simpson’s 1/3 rule to estimate the following definite integral with n
subintervals.
2 1 1 .6
x
(i) dx ;n = 4 (d) xe dx ; n = 6
0 1 cos x 1
20 x 3
(ii) dx ; n = 10 (e) 2 ln x dx ; n =8
0 5 1
sin t 2
(iii) dt ;n=8 (f) 2x cos x dx ; n = 10
t 0
189
Part 6 NUMERICAL INTEGRATION MAT 575
3. Refer to question (1), use the error estimate formula to approximate the error
if the given integral is approximated by Simpson’s 1/3 rule with the given
subintervals, n.
4. Consider the following definite integral with n subintervals, estimate :
(a) the definite integral using the Simpson’s 3/8 rule.
(b) the error accuracy.
2 1 1 .6
x
(i) dx ;n = 3 (iv) xe dx ; n = 6
0 1 cos x 1
18 x 3
(ii) dx ;n=9 (v) 2 ln x dx ; n = 6
0 5 1
sin t 2
(iii) dt ;n=9 (vi) 2x cos x dx ; n = 12
t 0
b
length 1 ( f ' ( x ))2 dx
a
(a) Approximate the arc length of each function using Simpson’s 1/3 rule with
n = 10.
(b) Approximate the error accuracy.
(c) How many ordinates are needed to estimate the integral with an accuracy
of 0.5 x103 .
(i) f ( x) x3 for 0 x 1
(ii) f ( x ) sin 2x for 0 x
8
190
Part 6 NUMERICAL INTEGRATION MAT 575
7. Use the Simpson’s 3/8 rule with n = 6 to estimate the area of the region under
the curve m( t ) 50 2t 2 and above the t-axis.
8. Stocking a Fish Pond As the fish and game warden of your township, you are
responsible for stocking the town pond with fish before the fishing season.
The average depth of the pond is 20 feet. Using the scaled map, you
measure distances across the pond at 225-foot intervals, as shown in the
diagram.
(a) Use the Simpson’s 3/8 Rule to estimate the volume of the pond.
(b) You plan to start the season with one fish per 100 cubic feet. You intend to
have at least 25% of the opening day’ fish population left at the end of the
season. What is the maximum number of licenses the town can sell if the
average seasonal catch is 20 fish per license?
0 ft
860 ft
520 ft
800 ft
1000 ft
1140 ft
1160 ft
1110 ft
860 ft
0 ft
191
Part 6 NUMERICAL INTEGRATION MAT 575
http://www.math.uky.edu/~rbrown/courses/ma114.f.03/lec16.pdf
http://www.maths.soton.ac.uk/emis/journals/JIPAM/v3n4/031_02_www.pdf
192