You are on page 1of 21

Numerical Integration

Section 8.6
No Antiderivatives? No Problem
• What if we wanted to find the following integrals?
1 1
 x2

0
x sin xdx or e
0
dx
• Since these functions do not have elementary known
antiderivatives, then we must estimate the value of such
integrals by estimating the area between the functions and
the x-axis between the boundaries of the integrals.
Trapezoidal
Simpson’s Rule

Approximation
Trapezoidal
Simpson’s Rule

Approximation
Trapezoidal
Simpson’s Rule

Approximation
Simpson’s Rule
Simpson’s Rule

A very good approximation to a definite integral


can be found with Simpson’s rule.

As you saw with the Trapezoid rule, the area


under the curve is divided into a number of
strips of equal width.

However, this time, there must be an even


number of strips as they are taken in pairs.

A brief explanation of how the rule is found


follows, but you just need to know the result.
Simpson’s Rule
Simpson’s Rule
Simpson’s Rule
Simpson’s Rule
Simpson’s Rule
2
 x2
e.g. To estimate e dx we’ll take 4 strips.
0

x
 x2
ye

The rule fits a quadratic curve to the 1st 3 points at


the top edge of the strips.
Simpson’s Rule
2
 x2
e.g. To estimate e dx we’ll take 4 strips.
0

x
 x2
ye

The rule fits a quadratic curve to the 1st 3 points at


the top edge of the strips.
Another quadratic curve is fitted to the 3rd, 4th and
5th points.
Simpson’s Rule
2
 x2
e.g. To estimate e dx we’ll take 4 strips.
0

x
 x2
x
ye
x

The rule fits a quadratic curve to the 1st 3 points at


the top edge of the strips.
Another quadratic curve is fitted to the 3rd, 4th and
5th points.
Simpson’s Rule
2
 x2
e.g. To estimate e dx we’ll take 4 strips.
0

x
 x2
x
ye
x

The rule fits a quadratic curve to the 1st 3 points at


the top edge of the strips.
Another quadratic curve is fitted to the 3rd, 4th and
5th points.
Simpson’s Rule

x
y0
y1  x2
x ye

y
x 2
y3 y4
h x
x

The formula for the 1st 2 strips is


h
( y 0  4 y1  y 2 )
3
For the 2nd 2 strips,
h
( y2  4 y3  y4 )
3
Simpson’s Rule
We get h
( y 0  4 y1  y 2 )
3 h
 ( y2  4 y3  y4 )
3
h
 ( y 0  4 y1  2 y 2  4 y 3  y 4 )
3
b
In general,
 y dx 
a
h
 y 0  4 y 1  2 y 2  4 y 3  2 y 4  . . .  2 y n  2  4 y n 1  y n 
3
Notice the symmetry in the formula.
The coefficients always end with 4, 1.
Simpson’s Rule
SUMMARY
 Simpson’s rule for estimating an area is
b
h
 ydx   y 0  4 y1  2 y 2  4 y 3  2 y 4  . . .  2 y n  2  4 y n 1  y n 
a
3
where n is the number of strips and must be even.
( Notice the symmetry in the formula. )
 The number of ordinates ( y-values ) is odd.
 The width, h, of each strip is given by h 
ba
n
 a is the left-hand limit of integration and the 1st
value of x.
 The accuracy can be improved by increasing n.
Simpson’s Rule

e.g. (a) Use Simpson’s rule with 4 strips to


estimate 1
1
 1  x2 dx
0

giving your answer to 4 d.p.


(b) Use your formula book to help you find the exact
value of the integral and hence find an
approximation for  to 3 s.f.
h
Solution: (a) A   y 0  4 y1  2 y 2  4 y 3  y 4 
3
( It’s a good idea to write down the formula with
the correct number of ordinates. Always one
more than the number of strips. )
Simpson’s Rule
Solution:
1
1 h
 dx   y 0  4 y1  2 y 2  4 y 3  y 4 
1  x2 3
0
10
n  4, h   0  25
4
x 0 0  25 05 0  75 1
y 1 0  94118 08 0  64 05
1
1 0  25
 dx   y 0  4 y1  2 y 2  4 y 3  y 4 
0 1 x 2 3
 0  7854 ( 4 d.p. )
Simpson’s Rule
1
1
(a)  1  x2 dx  0  7854 ( 4 d.p. )
0
(b) Use your formula book to help you find the exact
value of the integral and hence find an
approximation for  to 3 s.f.

 
1
Solution: 1 1 1
 1  x2 dx  tan x 0
0
 1
 tan 1  tan   1
0  

4
The answers to (a) and (b) are approximately equal:

So,  0  7854
4
   4  0  7854
 3  14 ( 3 s.f. )

You might also like