Sei sulla pagina 1di 5

Revisiting Numerical

Integration:
Getting More from Fewer Points

Bruce Cohen David Sklar


Lowell High School, SFUSD San Francisco State University
bic@cgl.ucsf.edu dsklar@sfsu.edu
http://www.cgl.ucsf.edu/home/bic

Asilomar - December 2007

Ver. 3.00

Romberg Integration

The method arises from a technique called Richardson extrapolation which


can be used whenever the error E(h) can be expanded in a series of the form

E ( h ) = c1h + c2 h 2 + c3 h3 + c4 h 4 + "

Well illustrate Richardsons technique by applying it to the trapezoidal rule.

f ( x ) dx = T (h) + E (h) , with E ( h ) = O ( h 2 )


b
I =
a

In fact we can show that if f can be expanded in a Taylor series on each


subinterval then E can be expanded in a series of the form

E ( h ) = c2 h 2 + c4 h 4 + c6 h 6 + c8 h8 + "

1
Romberg Integration
To implement the method we dont need to know the coefficients, we need only
know that they exist. Assume that we have computed trapezoidal estimates for
I for h, h/2, h/4, h/8, so we have T ( h ) , T ( h 2 ) , T ( h 4 ) , T ( h 8 ) . Just
looking at the first two we have
I = T ( h ) + E ( h ) = T ( h ) + c2 h 2 + c4 h 4 + c6 h 6 + c8 h8 + "

h h h h2 h4 h6 h8
and I = T + E = T + c2 2 + c4 4 + c6 6 + c8 8 + "
2 2 2 2 2 2 2

We can eliminate the h2 term by multiplying the second by 22 and subtracting


the first giving
h h4 h6 h8
( )
22 1 I = 22 T T ( h ) + c4 4 + c6 6 + c8 8 + "
2 2 2 2
Which we can rewrite as

h h h4 h6 h8
(2 2
1) I = ( 22 1) T + T T ( h ) + c4 4 + c6 6 + c8 8 + "
2 2 2 2 2

Romberg Integration

The last equation is equivalent to

h
T T (h)
h h4 h6 h8
I = T + 2
2
+ k4 4 + k6 6 + k8 8 + "
2 ( 2 1) 2 2 2

Which is in the form I = estimate + error

h4 h6 h8
= T2 ( h ) + k4 4
+ k6 6 + k8 8 + "
2 2 2

T2(h) is an estimate for I with an error that is O(h4)

2
Romberg Integration
h4 h6 h8
We can repeat the process beginning with I = T2 ( h ) + k4 + k 6 6 + k8 8 + "
24 2 2

h6 h8
And get a new estimate I = T3 ( h ) + k6 + k
8 8 + "
with
26 2
h
T2 T2 ( h )
h 2
T3 ( h ) = T2 +
2 ( 24 1)
Continuing in this way we get a sequence of estimates for the integral I

h
T j 1 T j 1 ( h )
h 2
T1 ( h ) = T ( h ) , T j ( h ) = T j 1 +

2 22( j 1) 1 ( )
Where for each estimate we have I = T j ( h ) + E j ( h ) , with E j ( h ) = O ( h 2 j )

Romberg Integration -- An example


To see how Romberg integration works We place our trapezoidal estimates in
we organize our estimates into an array the first column. The first estimate
as follows corresponds to a partition of [1, 3] into
T1 ( h ) h 4 subintervals, an h value of .
T j 1 T j 1 ( h )
h 2 Accuracy improves as we move down
T j 1 +
h
T1 T2 ( h )
2
2 ( )
22( j 1) 1 the column
h h
T1 T2 T3 ( h )

3

4 2 x 3 2 dx
1
3
h h
T1 T2 T3 T4 ( h ) = ( 35 2 15 2 ) = 5.835382907
h 2 52 2
= x
8 4 2 5 1 5
5.858234
The accuracy increases as we move
down and as we move to the right. 5.841100 5.835388
Next we perform Romberg integration
for a familiar example. 5.836813 5.835384 5.835384


3
x 3 2 dx 5.835740 5.835382 5.835382 5.835382
1

3
Romberg Integration -- An example
We can improve our Romberg result if we start with more precise (though quite
inaccurate) trapezoidal estimates in the first column. The averaging method used
to get the more accurate estimates involves the subtraction of nearly equal
numbers which can lead to precision loss as the computation progresses. The
distinction between precision and accuracy in computation is important in
practical numerical analysis.
5.858234 3
1
x3 2 dx
5.841100 5.835388
5.835382907

5.85823385920 5.836813 5.835384 5.835384

5.84110042206 5.83538927635 5.835740 5.835382 5.835382 5.835382

5.83681259147 5.83538331460 5.83538291715

5.83574034752 5.83538293287 5.835382907425.83538290726

Note: The correct value to 12 significant digits is 5.83538290725

Gaussian Quadrature

4
Gaussian Quadrature
In Gaussian quadrature the approximation to the integral is also a weighted sum
of function values. The evaluation points (which are not equally spaced ) and
weights are chosen to provide a very efficient estimate.
One way to implement Gaussian quadrature is to first transform the integral to an
integral from 1 to 1, and then, for appropriate numbers of points n, get the gauss
points and weights from the table. For our example we have

(u + 2)
3 1
I = x3 2 dx = using the linear substitution u = x 2
32
du ,
1 1

So using n = 5 points
5
f ( u ) du = (u + 2) du wi f ( ui )
1 1
I =
32
1 1
i =1

.23692885 f ( .906179846 ) + .478628671 f ( .538469310 )


+ .5688888889 f ( 0 ) + .23692885 f (.906179846 )
+ .478628671 f (.538469310 )

5.8353829 which is correct to 7 decimal places.

Bibliography
1. M. Abramowitz, I. Stegun, Handbook of Mathematical Functions, Dover,
New York, 1965
2. R. Burden, J. Faires, Numerical Analysis, 7th Edition, Brooks/Cole, 2001

3. F. B. Hildebrand, Introduction to Numerical Analysis, McGraw-Hill, New


York, 1956
4. http://numericalmethods.eng.usf.edu/anecdotes/romberg.doc

5. http://www-history.mcs.st-andrews.ac.uk/Biographies/

6. R Development Core Team, R: A language and environment for statistical


computing, R Foundation for Statistical Computing, Vienna, Austria,
2006, <http://www.R-project.org>
7. L. F. Richardson and J. L. Gaunt, The deferred approach to the limit,
Philosophical Transactions of the Royal Society of London 226A, 1927
8. W. Romberg, W. (1955), "Vereinfachte numerische Integration", Norske
Videnskabers Selskab Forhandlinger (Trondheim) 28 (7), 1955

Potrebbero piacerti anche