You are on page 1of 20

11.

NUMERICAL INTEGRATION
11.1 The Trapezium Rule
It often happens that we need to find the value of a definite integral for a function whose
indefinite integral cannot be found in terms of the elementary functions we know about already.
Since a definite integral represents an area between the graph of the function and the x-axis, all we
need to do is to find some way of approximating this area.
Of course we could sketch the curve on graph paper and estimate the area by counting
squares. But not only is this rather inconvenient, there’s no way we could get a high degree of
precision.
b
Let’s suppose that we have a function y = f(x) and we wish to estimate y dx . If we divide
a
the interval from a to b into n strips of equal width h these strips are basically rectangles. We
can easily find the area of each rectangle and the total the areas of these n strips.

…..
However a much better approximation can be obtained if we join the points on the curve by straight
lines:

…..

Sometimes the straight line goes above the curve and we include a little more area than we should.
Sometimes it goes below and we underestimate the strip of area. On average these tend to balance
each other – but not completely. We rarely get the exact value in this way. But the more strips we
take the more closely the lines will follow the curve and the better the approximation.

One strip:

Two strips:

135
Nine strips:

The area of a trapezium is the average length of the parallel sides multiplied by the distance
between them.

a b

h
a+b
Area = 2 h.
b
Suppose we want to estimate y dx and we use n strips, each of width h. Suppose the y-
a
values at the end-points of the strips are y0, y1, … , yn.
The total area of the strips, approximating each of them by a trapezium, is:
h h h h
2 (y0 + y1) + 2 (y1 + y2) + 2 (y2 + y3) + … + 2 (yn−1 + yn)
h
= 2 [y0 + yn + 2(y1 + y2 + … yn−1)].
h
(We can remember this as 2 [First + Last + Twice the others].)

Trapezium Rule
b width
y dx ≈ 2 [First + Last + 2 × Sum of others
a
10
Example 1: Estimate x2 dx by the Trapezium Rule, using 5 strips.
0
Solution: The width of each strip is h = 2.
x y y = x2
0 y0 0
2 y1 4
4 y2 16
6 y3 36
8 y4 64
10 y5 100

136
10
2
So x2 dx ≈ 2 .[0 + 100 + 2(4 + 16 + 36 + 64)] = 340.
0
10
1 10 1000
The exact value is x2 dx = 3x3 = 3 ≈ 333.3.
0
0
We can improve the accuracy of our estimate by fitting quadratic functions to our points
rather than straight lines.

11.2 The Cubic Fit Method


The problem with the Trapezium Method is that if the curve is concave downwards, and the
slope is decreasing, the trapeziums all lose some of the area and the Trapezium Rule gives an
underestimate.

On the other hand if the curve is concave upwards, and the slope is increasing, the
Trapezium Rule gives an overestimate.

Perhaps we can get greater accuracy by fitting a quadratic in each strip. A quadratic has a
formula y = ax2 + bx + c. The values of a, b and c would have to be found using information from
the graph.

But a strip has only two y-values, one at each end and we’d need three pieces of information
to solve for the three values. But what if we used the slopes at the end points? That would give us
four bits of information which would be more than enough. In fact we could fit a cubic:
y = ax3 + bx2 + cx + d.
y 1′

y 0′

y0 y1

0 h

137
In general a cubic would be able to fit a given curve more closely than a quadratic and so
give a more accurate estimate of the area. And even if a quadratic was better in a particular case we
could always have a = 0 and our “cubic” would collapse to a quadratic.
For convenience we’ll relocate the origin so that the strip goes from x = 0 to x = h. Suppose
that the cubic y = ax3 + bx2 + cx + d passes through (0, y0) and (h, y1) and that its derivatives at
x = 0 and x = h are y0′ and y1′ respectively. Then since y′ = 3ax2 + 2bx + c we have:
y0 = d
y0 ′ = c
y1 = ah3 + bh2 + ch + d
y1′ = 3ah2 + 2bh + c

Solving the last two equations for a, b in terms of c, d and h we get:


3y1 − hy1′ = bh2 + 2ch + 3d which gives:
1 1
b = h2 [3y1 − hy1′ − 2ch − 3d] = h2 [3y1 − hy1′ − 2y0′h − 3y0]

Eliminating b we get:
2y1 − y1′h = −ah3 + ch + 2d which gives:
1 1
a = − h3 (2y1 − y1′h − ch − 2d) = − h3 (2y1 − y1′h − y0′h − 2y0).
Assembling these coefficients we have:
1
a = − h3 (2y1 − y1′h − y0′h − 2y0).
1
b = h2 [3y1 − hy1′ − 2y0′h − 3y0]
c = y0 ′
d = y0 .

h h
a b c
Now the area under the cubic is (ax3 + bx2 + cx + d) dx = 4x4 + 3x3 + 2x2 + dx
0
0
ah4 bh3 ch2 h
= 4 + 3 + 2 + dh = 12 (3ah3 + 4bh2 + 6ch + 12d)
From the above equations:
3ah2 = 6y1 − 3y1′ − 3y0′ + 6y0
4bh2 = 12y1 − 4hy1′ − 8y0′ − 12y0
6ch = 6y0′h
12d = 12y0

h
All this looks pretty frightening, but watch how it all simplifies. (ax3 + bx2 + cx + d) dx
0
h
= 12 (−6y1 + 3y1′h + 3y0′h + 6y0 + 12y1 − 4hy1′ − 8y0′h − 12y0 + 6y0′h + 12y0)
h
= 12 (6y1 + 6y0 + y0′h − y1′h).

138
Suppose we repeat the above on n strips. The sum of the areas of the strips will be:
h
12 (6y0 + 6y1 + y0′h − y1′h)
h
+ 12 (6y1 + 6y2 + y1′h − y2′h)
h
+ 12 (6y2 + 6y3 + y2′h − y3′h)
+ ………………………….
h
+ 12 (6yn−1 + 6yn + yn−1′h − yn′h)
h
= 12 [6y0 + 6yn + 12(y1 + y2 + … + yn−1) + y0′h − yn′h]
h h2
= 2 [y0 + yn + 2(y1 + y2 + … + yn−1)] + 12 [y0′ − yn′].
Notice the way the derivatives telescope so that we only need to evaluate them at the
endpoints. Also, you may recognise the first part as simply the Trapezium Rule. The last term can
be thought of as a correction to the Trapezium Rule. Moreover, y0′ is the value of y′ when x = a
h2 b
and yn′ is the value of y′ when x = b, so this “correction term” is simply as 12 [y′] a

Cubic Fit Rule


b
h h2 b
y dx ≈ 2 [y0 + yn + 2(y1 + y2 + … + yn−−1)] + 12 [y′′]a .
a
Trapezium Rule Correction

Example 4: Use the Cubic Fit Rule with 3 strips to estimate 4 x dx .


1
1
Solution: If y = x then y′ =
2 x
x y y′′
1 1 0.5
2 1.4142
3 1.7320
4 2 0.25
1
TRAPEZIUM RULE = 2 [1 + 2(1.4142 + 1.7320) + 2] = 4.6462
1
CORRECTION = 12 [0.5 − 0.25] = 0.0208
CUBIC FIT ESTIMATE = 4.6670
NOTE: The exact value (to 4 decimal places) is 4.6667. The Cubic Fit rule with 3 strips is a better
approximation than Simpson’s Rule with 4 strips (4.6662).

139
Example 5: Use the Cubic Fit Rule with 5 strips to estimate 7logx dx .
2
1
Solution: If y = logx then y′ = x .
x y y′′
2 0.6931 0.5
3 1.0986
4 1.3863
5 1.6094
6 1.7918
7 1.9459
0.1429
1
TRAPEZIUM RULE = 2 [0.6931 + 2(1.0986 + 1.3863 + 1.6094 + 1.7918) + 1.9459] = 7.2056
1
CORRECTION = 12 [0.5 − 0.1429] = 0.0298
CUBIC FIT ESTIMATE = 7.2354

The only disadvantage of the Cubic Fit Method is that it requires the derivatives at the
endpoints. This means that we have to be given the function and we have to be able to differentiate
it. The difficulty arises in cases where all we’re given is the table of values. We could use the
Trapezium Rule but that’s not particularly accurate. Fortunately there’s a technique that gets
around this problem.

11.3 Parabolas
A parabola is the shape of the graph of a quadratic. The basic parabola is y = x2.

We can vary the shape by changing the coefficient of x2. The graph of y = ax2 is very similar to that
of y = x2. If a is positive then larger values of “a” give a tall, skinny parabola while small values of
“a” give short, fat parabolas.

Well, that’s perhaps a bit misleading. Parabolas are all infinitely tall and infinitely wide,
because as x takes larger and larger values so does ax2. It’s just that we only ever draw a finite
portion of the infinite parabola that makes it look this way.
A better way to describe the effect of increasing the value of “a” is to magnify the graph.
Suppose you were to cut out the central portion of the parabola y = x2 and magnify it to double its
size in each direction. The point (x, x2) would become (2x, 2x2) and 2x2 = ½(2x)2 so, relative to the
original scale, the graph would have the shape of y = ½x2.

140
Thus decreasing the value of “a” (as long as it remains positive) has the effect of enlarging
the graph. Or from another point of view it flattens the parabola. Increasing the value of “a” makes
the graph look thinner, as if we are looking at it from further away.
Changing the sign of “a” reflects the graph in the x-axis. The graph of y = −ax2 is exactly
like the graph of y= ax2 except that it is turned upside down.

The graph y = ax2 + c is also a parabola. The only difference between it and y = ax2 is that
the y values are increased by “c”. (If c is negative this is a decrease.) This has the effect of
moving the graph up or down in a vertical direction.

Including an “x” term has the effect of moving the graph left or right. If we have y = x2 + x
we can write this as y = (x2 + x + ¼) − ¼ = (x + ½)2 − ¼. The vertex of the parabola now occurs
when x = −½ and y = −¼. So the effect is to move the graph ½ unit to the left and ¼ unit down.
The general quadratic y = ax2 + bx + c represents a parabola, like y = x2 except that it may
be magnified or reduced, may be turned upside down, and may be moved about horizontally or
vertically.
The parabola is a versatile shape. Parabolic mirrors are used as reflectors in car headlights
and in reflective telescopes because they have the property of producing a parallel beam of light, or
focussing a parallel beam at a single point. Parabolas are very useful in approximating other curves.
While a parabola and some other curve may differ, over a small enough interval, the approximation
can be quite good. What we do therefore is to break up an arbitrary curve into small sections and
approximate each section by a different parabola.
And why might we wish to approximate a general curve by a series of parabolas? Well, so
that we can estimate the area under the curve for functions that we can’t integrate.

11.4 Area Under a Parabola


We’re going to develop a formula for the area under a parabola (strictly speaking, between
the parabola, the x-axis and two vertical lines) in terms of just 3 points on that parabola.
Let’s take the parabola y = x2 and a point at x = u on it. Now let’s move a small distance to
the left and the same distance to the right, giving two other points at x = u − h and x = u + h. So we
have three points, equally spaced horizontally, a distance h apart. Let’s call the corresponding y-
values y0, y1 and y2.

141
So:
y0 = (u − h)2,
y1= u2 and
y2 = (u + h)2.

y2
y1
y0

u−h u u+h

u+h u+h
1 1
The area of these two strips is x2 dx = 3x3 = 3 [(u + h)3 − (u − h)3].
u−h
u−h

Now (u + h)3 can be expanded by the Binomial Theorem as u3 + 3u2h + 3uh2 + h3. If you haven’t
learnt the Binomial Theorem you can work it out by squaring u + h and then multiplying by a
further u + h:
(u + h)3 = (u + h)2(u + h) = (u2 + 2uh + h2)(u + h) = u3 + 2u2h + uh2 + u2h + 2uh2 + h3
= u3 + 3u2h + 3uh2 + h3.

(u − h)3 can be now found by replacing h by −h.


(u − h)3 = u3 + 3u2(−h) + 3u(−h)2 + (−h)3 = u3 − 3u2h + 3uh2 − h3.
(The effect is to introduce alternating signs.)
So (u + h)3 = u3 + 3u2h + 3uh2 + h3 and
(u − h)3 = u3 − 3u2h + 3uh2 − h3.
1 h
So (u + h)3 − (u − h)3 = 6u2h + 2h3 and so the area is 3 [6u2h + 2h3] =3 [6u2 + 2h2].
Now we write everything in terms of y0, y1 and y2.
Remember that y1 = u2.
Also y0 = (u − h)2 = u2 − 2uh + h2 and y2 = (u + h)2 = u2 + 2uh + h2.
So y0 + y2 = 2u2 + 2h2 and hence h2 = (y0 + y2) − 2u2 = (y0 + y2) − 2y1.
This means that we can write the area of these two strips is
h h
[6y 1 + (y0 + y2) − 2y1] =
3 3 [y0 + 4y1 + y2].
Because this formula expresses the area in terms of horizontal and vertical distances it will
still work if we change the scale or move the parabola around or even turn it upside down. In other
words it works for the area between any quadratic function and the x-axis. All we have to do is to
split the area into two strips and use the width of the strips h and the three y-values y0, y1 and y2
corresponding to the endpoints of these strips.

y2
y1
y0

h h

142
b h
(any quadratic) = [y + 4y1 + y2]
3 0
a
b−a
where h = , the width of the 2 strips and y0, y1, y2 are
2
the y-values of the three endpoints of these two strips.

11.5 Approximating Areas Under Other Curves


The above formula is exact for quadratics. But if we approximate another function by a
quadratic we can use the same formula to approximate the area for that other function.

y2
y1
y0

h h
The dotted graph represents some function y = f(x) which we have approximated by the quadratic
that passes through the three points shown. The solid curve represents that quadratic. The area
under the dotted curve will be approximately equal to that under the quadratic, so the formula:
h
[y + 4y1 + y2]
3 0

will give an estimate for the area under y = f(x).

The closeness of the approximation depends on how closely the quadratic follows the given
curve. If the strips are narrow the approximation will be very good. The narrower the strips, the
better the approximation.
b−a
The trouble is that if we want the area from “a” to “b”, the width h = 2 may not be very
small. The trick is to divide the interval [a, b] into an even number of strips and fit a different
quadratic to each pair of strips.

y0 y1 y2 y3 y4 y5 y6 y7 y8

a a+h a+2h a+3h a+4h a+5h a+6h a+7h a+8h = b

The y-values of all of these points are called ordinates and if we denote them by y0, y1, y2,
h
y3, … y2n (where there are 2n strips) then we can use the basic 3 [y0 + 4y1 + y2] formula for each
pair of strips and add the results together.

143
h
For the first pair of strips we can use the formula exactly, to give 3 [y0 + 4y1 + y2]. For the
h
second pair of strips we have ordinates y2, y3, y4 and so the area becomes 3 [y2 + 4y3 + y4].
The total area for 8 strips is therefore (the spacing puts the same yi’s underneath one
h
another) is 3 times
[y0 + 4y1 + y2]
+ [y2 + 4y3 + y4]
+ [y4 + 4y5 + y6]
+ [y6 + 4y7 + y8]

h
= 3 [y0 + 4y1 + 2y2 + 4y3 + 2y4 + 4y5 + 2y6 + 4y7 + y8].
A similar formula holds for any (even) number of strips. Never attempt to use an odd
number of strips. The easiest way to remember this is to call ordinates odd or even according to the
subscript. So y0, y2, .. are the even ordinates and y1, y3, … are the odd ones. Notice that the odd
ordinates have a weighting of 4 in the formula while the even ones have a weighting of 2, except for
the first and last which while even, only have a weighting of 1. Simpson’s Rule, can thus be
expressed as:

b
(any function) ≈
a
width
[first + last + 2(sum of other evens) + 4(sum of odds)]
3

11.6 Simpson’s Spreadsheet


Like Newton’s Method, Simpson’s Rule is best done in a spreadsheet, even if you are doing
it by hand with the aid of a calculator. Setting the working out in table form makes for fewer errors.
Like Newton’s Spreadsheet, this one has 4 columns. The headings are x, y, w and wy. The w’s are
the weights. These are 1’s 2’s and 4’s as appropriate. The wy column contains the product of the
w’s and the y’s. The y’s are the ordinates, got by substituting the x’s into the function. And the x’s
are evenly spaced over the interval over which we are integrating.

x y w wy

The first thing to do is to decide how many strips you’re going to use. You must use an
even number of strips. The more strips you use the more work you’ll have to do. But, up to a
point, the more strips the more accurate will be the answer, but not always. We’ll discuss the
number of strips you should use later.
Having decided on the number of strips, you work out the width of each. If you’re
b−a
integrating from “a” to “b” and have 2n strips then the width is h = 2n .
In the first row, in the x column, you put down the bottom limit of integration. You then
add “h” to each “x” to get the next, and keep stepping out until you reach the top limit, “b”. With
2n strips this should give 2n + 1 rows. (There’s always one more endpoint than strips.)

x y w wy

144
a
a+h
a + 2h
a + 3h
…..
b

The next step is to substitute each of these values of x into the function and write down the
corresponding y-values into the y-column.

x y w wy
a y0
a+h y1
a + 2h y2
a + 3h y3
….. …..
b y2n

The weights always follow the same pattern. The first is a 1, and then they alternate 4, 2, 4,
2, … until the second last is a 4 and then the last is a 1.

x y w wy
a y0 1
a+h y1 4
a + 2h y2 2
a + 3h y3 4
….. ….. …..
b y2n 1

The “wy” column is now computed by multiplying each y-value by the appropriate weight:

x y w wy
a y0 1 y0
a+h y1 4 4y1
a + 2h y2 2 2y2
a + 3h y3 4 4y3
….. ….. …..
b y2n 1 y2n

You then total the wy column.

x y w wy
a y0 1 y0
a+h y1 4 4y1
a + 2h y2 2 2y2
a + 3h y3 4 4y3
….. ….. …..
b y2n 1 y2n
TOTAL

145
Underneath this you write the width divided by 3:

x y w wy
a y0 1 y0
a+h y1 4 4y1
a + 2h y2 2 2y2
a + 3h y3 4 4y3
….. ….. …..
b y2n 1 y2n
TOTAL
h/3

You then multiply these last two figures to get the approximation for the integral.

x y w wy
a y0 1 y0
a+h y1 4 4y1
a + 2h y2 2 2y2
a + 3h y3 4 4y3
….. ….. …..
b y2n 1 y2n
TOTAL
h/3 ×
INTEGRAL

Example 2: Use Simpson’s Rule to approximate 4 x dx using 6 strips. Compare this with the
1
exact value.
Solution: The width is h = 0.5
x y w wy
1 1 1 1
1.5 1.2247 4 4.8988
2 1.4142 2 2.8284
2.5 1.5811 4 6.3244
3 1.7320 2 3.4640
3.5 1.8708 4 7.4832
4 2 1 2.0000
TOTAL 27.9988
h/3 1/6
INTEGRAL 4.6665

Performing the exact integration we get:


4
4 x dx = 4x1/2 dx = 2x3/2 = 2 [43/2 − 13/2] = 2 [23 − 1] = 14 ≈ 4.6667
1 1 3 1 3 3 3
So even with as few strips as 6 we have achieved a very good approximation by Simpson’s Rule.

146
11.7 How Many Strips?
Remember:

You must use an even number of strips with Simpson’s Rule.

Secondly, if you use Simpson’s Rule to integrate a quadratic you need only two strips.
Naturally if you approximate a quadratic by a quadratic you’ll come up with the exact value, no
matter how many strips you use. So in this case you may as well use as few strips as possible, that
is, two strips.
When integrating a cubic Simpson’s Rule is exact, even with as few as 2 strips. Although
the quadratic approximation doesn’t match the cubic, the bits where the quadratic goes above the
cubic are compensated exactly by the bits where it goes underneath.
Of course there’s no reason why you should be attempting to use Simpson’s rule for a
quadratic, or a cubic or any function that you can integrate. In the above example we used
Simpson’s Rule to integrate x from 1 to 4. But we can integrate x and this will give the exact
value with much less work.

Don’t use Simpson’s Rule if you can integrate the function.

Usually Simpson’s Rule is not exact. But the more strips you take (only ever an even
number) the more accurate the answer, at least in theory.
In practice there’s the phenomenon of round-off errors. Your calculator will calculate the
ordinates to so many decimal places but there are usually tiny errors for each ordinate. If you were
to take an enormous number of strips, these round-off errors might very well build up and
counteract the better accuracy because the parabolas are fitting better.

Example 3: Simpson’s Rule was used to estimate 4 x dx using more and more strips. Keep in
1
mind that the exact value is 4.66666….

# strips estimate # places of accuracy


2 4.662277660 2
4 4.666220710 3
6 4.666563053 3
8 4.666631374 4
10 4.666651629 4
20 4.666665668 5
30 4.666666467 6
50 4.666666642 7
100 4.666666668 8
1000 4.666666656 7

You’ll see from this that you get quite a lot of accuracy with relatively few strips. A good
rule of thumb, when using Simpson’s Rule with hand calculation, is to use 6, 8 or 10 strips. Your
decision as to how many strips you choose may be based on convenience as much as accuracy. For
example integrating from 1 to 4 using 6 strips gives a width of 0.5 while 8 strips gives a width of
0.375 which is less convenient. Ten strips may be a good choice in that it combines convenience
with a fairly good degree of accuracy.
But small improvements in accuracy come at a very great price in amount of computation.
If you were doing the calculations on a computer you might decide that 1000 strips would be your

147
choice. But notice that, working to 9 decimal places, gave a little less accuracy with 1000 strips
than what was achieved with only 100. More is not always better.

We have three rules: the Trapezium Rule, the Cubic Fit Rule and Simpson’s Rule. Which
one is the best to use? For a start, never use the Trapezium Rule. It’s not as accurate as the other
two and was only introduced as an introduction to them.
If you have no function but only a table of values you must use Simpson’s Rule. But if you
have the function, and can readily differentiate it, the Cubic Fit Rule gives a fair bit more accuracy
for the same amount of work.

RULE ACCURACY NEEDS # STRIPS USE WHEN


Trapezium least table of values any number never
Simpson’s good table of values even number you only have a table of values
Cubic Fit better the function any number you have a formula

EXERCISES FOR CHAPTER 11


In the following exercises use the Cubic Fit Rule with 6 or 7 strips to approximate the given
definite integrals. Use your calculator to evaluate the function at each of the points. Work to
4 decimal places.
8 12
Exercise 1: x2 dx . Exercise 2: 2x + 1 dx .
1 0

4
40
dx
Exercise 3: . Exercise 4: log x dx .
3x − 2 10
1

1.4
2
Exercise 5: ex dx .
0

Use Simpson’s Rule with 8 strips to approximate the following definite integrals.
[Normally one would use the Cubic Fit Rule when given a function but rather than providing you
with tables of values it saves space if you are asked to produce your own.]
8 8
Exercise 6: x2 dx . Exercise 7: x dx .
0 0

5
3
dx
Exercise 8: x . Exercise 9: x2 − x dx .
2
1

30 2
Exercise 10: log t dt . Exercise 11: 2t dt .
10 0

1
6
1
Exercise 12: 1 + u2 du . Exercise 13: 36 − x2 dx .
0
0

148
SOLUTIONS FOR CHAPTER 11
2
Exercise 1: If y = x then y′ = 2x. Dividing the interval from 1 to 8 into 7 strips the width of each
strip is h = 1.
x y y′′
1 1 2
2 4
3 9
4 16
5 25
6 36
7 49
8 64 16

1
TRAPEZIUM RULE = 2 [1 + 2(4 + 9 + 16 + 25 + 36 + 49) + 64] = 171.5
1
CORRECTION = 12 [2 − 16] = − 1.1667
CUBIC FIT ESTIMATE = 170.3333 [The Cubic Fit Rule gives the exact value in this case.]

1 1
Exercise 2: If y = 2x + 1 then y′ = .2 (by the Chain Rule) = .
2 2x + 1 2x + 1
Dividing the interval from 0 to 12 into 6 strips the width of each strip is h = 2.
x y y′′
0 1 1
2 2.2361
4 3
6 3.6056
8 4.1231
10 4.5826
12 5 0.2

2
TRAPEZIUM RULE = 2 [1 + 2(2.2361 + 3 + 3.6056 + 4.1231 + 4.5826) + 5] = 41.0948
4
CORRECTION = 12 [1 − 0.2] = 0.2667
CUBIC FIT ESTIMATE = 41.3615 [The exact value to 4 decimal places is 41.3333.]

1 3
Exercise 3: If y = then y′ = − (by the Chain Rule).
3x − 2 (3x −2)2
Dividing the interval from 1 to 4 into 6 strips the width of each strip is h = 0.5.

x y y′′
1 1 −3
1.5 0.4
2 0.25
2.5 0.1818
3 0.1429
3.5 0.1176
4 0.1 −0.03

149
0.5
TRAPEZIUM RULE = 2 [1 + 2(0.4 + 0.25 + 0.1818 + 0.1429 + 0.1176) + 0.1] = 0.8211
0.25
CORRECTION = 12 [(−3) − (−0.03)] = −0.0619
CUBIC FIT ESTIMATE = 0.7592
[The exact value to 4 decimal places is 0.7675. While this isn’t particularly it is somewhat better
than Simpson’s Rule with 6 strips.]

1
Exercise 4: If y = log x then y′ = x .
Dividing the interval from 10 to 40 into 6 strips the width of each strip is h = 5.

x y y′′
10 2.3026 0.1
15 2.7081
20 2.9957
25 3.2189
30 3.4012
35 3.5553
40 3.6889 0.025

5
TRAPEZIUM RULE = 2 [2.3026 + 2(2.7081 + 2.9957 + 3.2189 + 3.4012 + 3.5553) + 3.6889]
= 94.37475
25
CORRECTION = 12 [0.1 − 0.025] = 0.1562
CUBIC FIT ESTIMATE = 94.5309
[The exact value to 4 decimal places is 94.5293. To get a better estimate than this by Simpson’s
Rule would require using 10 strips.]
2 2
Exercise 5: If y = ex then y′ = 2x. ex (by the Chain Rule)
Dividing the interval from 0 to 1.4 into 7 strips the width of each strip is h = 0.2.

x y y′′
0 1 0
0.2 1.0408
0.4 1.1735
0.6 1.4333
0.8 1.8965
1 2.7183
1.2 4.2207
1.4 7.0993 19.8781

TRAPEZIUM RULE
0.2
= 2 [1 + 2(1.0408 + 1.1735 + 1.4333 + 1.8965 + 2.7183 + 4.2207) + 7.0993]
= 3.3065
0.04
CORRECTION = 12 [0 − 19.8781] = −0.0663
CUBIC FIT ESTIMATE = 3.2402

150
[The exact value to 4 decimal places is 3.2409. To get a better estimate than this by Simpson’s
Rule would require using 10 strips.]

8 x y w wy
Exercise 6: x2 dx ≈ 170.6667. 0 0 1 0
0
1 1 4 4
2 4 2 8
3 9 4 36
4 16 2 32
5 25 4 100
6 36 2 72
7 49 4 196
8 64 1 64
TOTAL 512
INTEGRAL 170.6667

8
Exercise 7: x dx ≈ 15.0039. x y w wy
0 0 0 1 0.0000
1 1 4 4.0000
2 1.4142 2 2.8284
3 1.7321 4 6.9284
4 2 2 4.0000
5 2.2361 4 8.9444
6 2.4495 2 4.8990
7 2.6458 4 10.5832
8 2.8284 1 2.8284
TOTAL 45.0118
INTEGRAL 15.0039

5
dx x y w wy
Exercise 8: x ≈ 1.6108. 1 1 1 1
1
1.5 0.6667 4 2.6668
2 0.5 2 1.0000
2.5 0.4 4 1.6000
3 0.3333 2 0.6666
3.5 0.2857 4 1.1428
4 0.25 2 0.5000
4.5 0.2222 4 0.8888
5 0.2 1 0.2000
TOTAL 9.6650
INTEGRAL 1.6108

151
3 x y w wy
2
Exercise 9: x − x dx ≈ 1.5785. 2 1.4142 1 1.4142
2
2.125 1.4577 4 5.8308
2.25 1.5 2 3.0000
2.375 1.5411 4 6.1644
2.5 1.5811 2 3.1622
2.625 1.6202 4 6.4808
2.75 1.6583 2 3.3166
2.875 1.6956 4 6.7824
3 1.7320 1 1.7320
TOTAL 37.8834
INTEGRAL 1.5785

30 x y w wy
Exercise 10: log t dt ≈ 59.0095. 10 2.3026 1 2.3026
10
12.5 2.5257 4 10.1028
15 2.7080 2 5.4160
17.5 2.8622 4 11.4488
20 2.9957 2 5.9914
22.5 3.1135 4 12.4540
25 3.2189 2 6.4378
27.5 3.3142 4 13.2568
30 3.4012 1 3.4012
TOTAL 70.8114
INTEGRAL 59.0095

2
Exercise 11: 2x dt ≈ 4.3281. x y w wy
0 0 1 1 1.0000
0.25 1.1892 4 4.7568
0.5 1.4142 2 2.8284
0.75 1.6818 4 6.7272
1 2 2 4.0000
1.25 2.3784 4 9.5136
1.5 2.8284 2 5.6568
1.75 3.3636 4 13.4544
2 4 1 4.0000
TOTAL 51.9372
INTEGRAL 4.3281

152
1 u y w wy
1
0 1 1 1.000
Exercise 12: 1 + u2 du ≈ 0.7854.
0 0.125 0.9846 4 3.9384
0.25 0.9412 2 1.8824
0.375 0.8767 4 3.5068
0.5 0.8 2 1.6000
0.625 0.7191 4 2.8764
0.75 0.64 2 1.2800
0.875 0.5664 4 2.2656
1 0.5 1 0.5000
TOTAL 18.8496
INTEGRAL 0.7854

6
Exercise 13: 36 − x2 dx ≈ 28.0905. x y w wy
0 0 6 1 6.0000
0.75 5.9529 4 23.8116
1.5 5.8095 2 11.6190
2.25 5.5622 4 22.2488
3 5.1962 2 10.3924
3.75 4.6838 4 18.7342
4.5 3.9686 2 7.9372
5.25 2.9047 4 11.6188
6 0 1 0.0000
TOTAL 112.3620
INTEGRAL 28.0905

153
154

You might also like