Beruflich Dokumente
Kultur Dokumente
MATH 160/A06
Lecture Notes 12
.......... ......... .... ... ........... ............ .......... ........ .... ......... ....... ....................... ........................ .................... ....................... .......... ........................ ........ ........................... ......... ........
... ................... ........................ ... ..... ..... ... ... ................. ... ................ ... ................... ...................
Lecture Notes 12 .. .......... ................... .. ....... ... ..
...... ...... ............. ..................
.. ............... .. ............... .. .......... .......... ..
............. ............. ...... ...... ...........
... ...
.. ..
......
. . . . . .. .
... ........... ... ... ... ... ..................... .................. ... ................. ...................... ... ... ... ... ...................... ... ........... ...
...... ...... ...... ............. ........... ...... ...... ...... ..... ...... ...... ............. ...... ...... Page 1
1. Refinement of subdivision Z b
Let us recall that in the trapezoidal rule for approximating f (x) dx, we subdivide the interval [a, b] into n
a
equal subintervals, where n is any positive integer.
Let us denote by R1,0 the approximation by trapezoidal rule obtained using n equal subintervals. Let us
obtain a refinement of the subdivision by bisecting each of the n subintervals and denote by R2,0 the
approximation by trapezoidal rule. We shall obtain a relationship between these two approximations.
Now , let us consider only the points in the subdivision with even subscripts, namely x0, x2, x4, . . . , x2n.
They comprise a subdivision of [a, b] into n equal subintervals.
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
x0 x1 x2 x3 x4 x5 x2n2x2n1 x2n
Then for this subdivision, the length of each subinterval is 2h where h is the length of an interval in the finer
subdivision. Then we obtain the following:
.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
x0 x2 x4 x2n2 x2n
n
R2,0 = 1
X
2 R1,0 + h f (x2k1) (1)
k=1
ba
Let us remember that in this formula, h = .
2n
It is important to note that formula (1) tells us that by refining a given subdivision by bisection, the new
estimate by trapezoidal rule is:
.......... ......... .... ... ........... ............ .......... ........ .... ......... ....... ....................... ........................ .................... ....................... .......... ........................ ........ ........................... ......... ........
... ................... ........................ ... ..... ..... ... ... ................. ... ................ ... ................... ...................
Lecture Notes 12 .. .......... ................... .. ....... ... ..
...... ...... ............. ..................
.. ............... .. ............... .. .......... .......... ..
............. ............. ...... ...... ...........
... ...
.. ..
......
. . . . . .. .
... ........... ... ... ... ... ..................... .................. ... ................. ...................... ... ... ... ... ...................... ... ........... ...
...... ...... ...... ............. ........... ...... ...... ...... ..... ...... ...... ............. ...... ...... Page 4
Half of the previous estimate plus h times the summation of the function values at the midpoints, where
h is the length of a subinterval in the finer subdivision (or half of the length of each interval in the previous
subdivision).
Using this rule, we can improve the estimate R2,0 to R3,0 by repeating the refinement procedure.
Example 1. Refinement
Let f (x) = 1
x , and let [a, b] = [1, 2]. Using n = 1, find R1,0 , R2,0 , R3,0 , R4,0 .
Z 2
1
SOLUTION: We know that R1,0 is the trapezoidal rule approximation to dx where n = 1. There-
1 x
fore, h = ba
n = 21 = 1.
1
h 1 1
R1,0 = 2 (f (a) + f (b)) = 2 1 + 2 = 0.75
By formula (1)
R2,0 = 1
2 R1,0 + 0.5f (1.5)
=12 (0.75) + 0.5 1
1.5
= 0.708333
.......... ......... .... ... ........... ............ .......... ........ .... ......... ....... ....................... ........................ .................... ....................... .......... ........................ ........ ........................... ......... ........
... ................... ........................ ... ..... ..... ... ... ................. ... ................ ... ................... ...................
Lecture Notes 12 .. .......... ................... .. ....... ... ..
...... ...... ............. ..................
.. ............... .. ............... .. .......... .......... ..
............. ............. ...... ...... ...........
... ...
.. ..
......
. . . . . .. .
... ........... ... ... ... ... ..................... .................. ... ................. ...................... ... ... ... ... ...................... ... ........... ...
...... ...... ...... ............. ........... ...... ...... ...... ..... ...... ...... ............. ...... ...... Page 5
R3,0 = 1
2 (0.708333) + 0.25 (f (1.25) + f (1.75))
= 0.697024
R4,0 = 1
2 (0.697024) + 0.125 (f (1.125) + f (1.375) + f (1.625) + f (1.875))
= 0.694122
....................................................................................................................................................................................................................................................................................
1 1.5 2
...................................................................................................................................................................................................................................................................................
1 1.25 1.5 1.75 2
...................................................................................................................................................................................................................................................................................
1 1.125 1.25 1.375 1.5 1.625 1.75 1.875 2
.......... ......... .... ... ........... ............ .......... ........ .... ......... ....... ....................... ........................ .................... ....................... .......... ........................ ........ ........................... ......... ........
... ................... ........................ ... ..... ..... ... ... ................. ... ................ ... ................... ...................
Lecture Notes 12 .. .......... ................... .. ....... ... ..
...... ...... ............. ..................
.. ............... .. ............... .. .......... .......... ..
............. ............. ...... ...... ...........
... ...
.. ..
......
. . . . . .. .
... ........... ... ... ... ... ..................... .................. ... ................. ...................... ... ... ... ... ...................... ... ........... ...
...... ...... ...... ............. ........... ...... ...... ...... ..... ...... ...... ............. ...... ...... Page 6
2. Richardsons Extrapolation
4R2,0 R1,0
Let us compute .
3
2n1
X n1
X
2h f (a) + f (b) + 2 f (xk ) h f (a) + f (b) + 2 f (x2k )
4R2,0 R1,0 k=1 k=1
=
3 3
2n1
X n1
X
h(f (a) + f (b)) + 4h f (xk ) 2h f (x2k )
k=1 k=1
=
3
n n1
h X X
= f (a) + f (b) + 4 f (x2k1) + 2 f (x2k )
3 k=1 k=1
Notice that the result, which is Simpsons 1/3-rule for a subdivision into 2n equal intervals, is a known im-
provement over the corresponding trapezoidal rule. We will denote this by R2,1.
Now, suppose that R1,0, R2,0, R3,0, . . . , Rm,0 are estimates by successive refinements. We have de-
noted by R2,1 the result of Richardsons extrapolation applied to R1,0 and R2,0. We denote by R3,1 the
result of Richardsons extrapolation applied to R2,0 and R3,0. In general, Rj,1 is the result of Richardsons
extrapolation applied to Rj1,0 and Rj,0. The general formula for these first improvements is:
4Rj,0 Rj1,0
Rj,1 =
3
Richardsons extrapolation can be applied to the set of first improvements R2,1, R3,1, R4,1, . . . . The result
of he extrapolation applied to R2,1 and R3,1 is denoted by R3,2 and is given by the formula
42Rj,1 Rj1,1
Rj,2 =
42 1
The second improvements are then R3,2, R4,2, R5,2, . . . , Rj,2.
4k Rj,k1 Rj1,k1
Rj,k = , k = 1, 2, . . . , j 1 (2)
4k 1
.......... ......... .... ... ........... ............ .......... ........ .... ......... ....... ....................... ........................ .................... ....................... .......... ........................ ........ ........................... ......... ........
... ................... ........................ ... ..... ..... ... ... ................. ... ................ ... ................... ...................
Lecture Notes 12 .. .......... ................... .. ....... ... ..
...... ...... ............. ..................
.. ............... .. ............... .. .......... .......... ..
............. ............. ...... ...... ...........
... ...
.. ..
......
. . . . . .. .
... ........... ... ... ... ... ..................... .................. ... ................. ...................... ... ... ... ... ...................... ... ........... ...
...... ...... ...... ............. ........... ...... ...... ...... ..... ...... ...... ............. ...... ...... Page 8
Z b
Let us note that Rj,0 is the approximation to f (x) dx using the trapezoidal rule while Rj,1 is the approxi-
a
mation using Simpsons rule. The improved approximation Rj,2 obtained from Richardsons extrapolation is
known as Booles rule.
Sometimes also, we refer to Rj,1 as the first improvement (over the trapezoidal rule), Rj,2 is the second
improvement, etc., and in general Rj,k is the kth improvement.
It is convenient to arrange the values of the Romberg estimates Rj,k in a table. Let us illustrate the case
where 1 j 5
j\k 0 1 2 3 4
1 R1,0
2 R2,0 R2,1
3 R3,0 R3,1 R3,2
4 R4,0 R4,1 R4,2 R4,3
5 R5,0 R5,1 R5,2 R5,3 R5,4
.......... ......... .... ... ........... ............ .......... ........ .... ......... ....... ....................... ........................ .................... ....................... .......... ........................ ........ ........................... ......... ........
... ................... ........................ ... ..... ..... ... ... ................. ... ................ ... ................... ...................
Lecture Notes 12 .. .......... ................... .. ....... ... ..
...... ...... ............. ..................
.. ............... .. ............... .. .......... .......... ..
............. ............. ...... ...... ...........
... ...
.. ..
......
. . . . . .. .
... ........... ... ... ... ... ..................... .................. ... ................. ...................... ... ... ... ... ...................... ... ........... ...
...... ...... ...... ............. ........... ...... ...... ...... ..... ...... ...... ............. ...... ...... Page 9
j\k 0 1 2 3
1 R1,0
2 R2,0 R2,1
3 R3,0 R3,1 R3,2
4 R4,0 R4,1 R4,2 R8,3
Here is the first step:
j\k 0 1 2 3
1 0.75
2 0.708333
3 0.697024
4 0.694122
The next column is filled-up with:
40.7083330.75 = 0.694444, 40.6970240.70833 = 0.693254, 40.6941220.697024 = 0.693155
41 41 41
.......... ......... .... ... ........... ............ .......... ........ .... ......... ....... ....................... ........................ .................... ....................... .......... ........................ ........ ........................... ......... ........
... ................... ........................ ... ..... ..... ... ... ................. ... ................ ... ................... ...................
Lecture Notes 12 .. .......... ................... .. ....... ... ..
...... ...... ............. ..................
.. ............... .. ............... .. .......... .......... ..
............. ............. ...... ...... ...........
... ...
.. ..
......
. . . . . .. .
... ........... ... ... ... ... ..................... .................. ... ................. ...................... ... ... ... ... ...................... ... ........... ...
...... ...... ...... ............. ........... ...... ...... ...... ..... ...... ...... ............. ...... ...... Page 10
REMARK: In solving the sample problem, we started with R1,0 where n = 1. Consequently, a lot of
computations were involved. It would be better to start with a larger value of n. To illustrate this, let us start
with n = 5. Here h = 21
5 = 0.2. Our function is the same, f (x) = 1.
x
R1,0 = 0.2
X
2
f (1) + f (2) + 2 f (xk ) (Trapezoidal rule)
k=14
1 1 1 1
= 0.1 1 + 0.5 + 2 + + +
1.2 1.4 1.6 1.8
= 0.1 (1.5 + 2 2.72817)
= 0.695635
.......... ......... .... ... ........... ............ .......... ........ .... ......... ....... ....................... ........................ .................... ....................... .......... ........................ ........ ........................... ......... ........
... ................... ........................ ... ..... ..... ... ... ................. ... ................ ... ................... ...................
Lecture Notes 12 .. .......... ................... .. ....... ... ..
...... ...... ............. ..................
.. ............... .. ............... .. .......... .......... ..
............. ............. ...... ...... ...........
... ...
.. ..
......
. . . . . .. .
... ........... ... ... ... ... ..................... .................. ... ................. ...................... ... ... ... ... ...................... ... ........... ...
...... ...... ...... ............. ........... ...... ...... ...... ..... ...... ...... ............. ...... ...... Page 12
1 1 1 1 1
R2,0 = 1
2 (0.695635) + 0.1 + + + +
1.1 1.3 1.5 1.7 1.9
= 0.693771
1 (0.693771)
R3,0 = 2
1 1 1 1 1 1 1 1 1 1
+ 0.05 + + + + + + + + +
1.05 1.15 1.25 1.35 1.45 1.55 1.65 1.75 1.89 1.95
= 0.693303
Therefore,
Z 2
1
dx 0.693147
1 x
Z 2
1
dx = ln x]2
1
1 x
= ln 2 ln 1
= ln 2
0.69314718055994530942
TOLERANCE. When using the Romberg integration, we need to have a guide to tell us when to stop building
up our table.
If we examine the table of values in the last example, the diagonal entries in the table starting from the top
row down to the bottom row, are successive estimates for the integral.
Let Ru,k+1 be the last entry in row k + 1 and Rv,k be the last entry in row k. Then the kth difference in
estimates is |Ru,k+1 Rv,k |.
Suppose that our tolerance is = 0.000001. In the last example, the differences are:
The second difference is still larger than the tolerance so in this case we need to continue building the table.
j\k 0 1 2 3
1 0.695635
2 0.693771 0.69315
3 0.693303 0.693147 0.693147
4 0.693186 0.693147 0.693147 0.693147
The last difference is now 0 and obviously less than the tolerance. So we stop and take the answer
0.693147.