CHAPTER 07.04: ROMBERG INTEGRATION: Richardsons Extrapolation of Trapezoidal Rule: Example

 

In this segment, we're going to take . . . we're going to talk about Richardson's extrapolation formula, which is based on trapezoidal rule, the multiple segment trapezoidal rule, and we'll take an example to see that how we can use the Richardson's extrapolation formula to come up with a better estimate of the integral.  We are given this integral here, going from 8 to 30, 2000 log of 14000, divided by . . . sorry, 140000 minus 2100 t, minus 9.81, dt, this integral is given to us.  Also given to use is . . . are the values of the integral which have been calculated by the multiple segment trapezoidal rule, n is the number of segments used for the multiple segment trapezoidal rule, and the approximate value of the integral is given to us.  For if you use one segment trapezoidal rule, you get 11868, if you're going to use two segments, you get 1266, and if you use four segments, you get 11113, if you use eight segments, you get 11074. So this has already been done, that people are using the multiple segment trapezoidal rule, and these are the values which they're getting for the approximate value by using multiple segment trapezoidal rule, and the question that is being asked is that find a better estimate, find a better estimate of the integral. We're asked to find a better estimate of the integral using Richardson's extrapolation formula. So how do I go about finding a better estimate of the integral using Richardson's extrapolation formula based on these numbers which are given to us?  So what I'm going to do is I'm going to, let's suppose, go ahead and find out how do I get a better estimate from using one and two segments, because all it requires is that having the value with n segments and double the segments, then I'm going to just go ahead and take these two, then I'm just going to take these two, and so on and so forth, and see that whether I get a better and better estimate.  So let's do one of them, and then we will go ahead and just write down what other ones are.  So for example, if I'm going to use the approximate value using two segments, and then I'm going to use the approximate value using four segments.  The approximate value using two segments is 11266, and the approximate value using four segments is 11113.  How can I use the approximate value by using two segment trapezoidal rule and the four segment trapezoidal rule, using the Richardson's extrapolation formula to get a better estimate?  So again, the formula is the approximate value obtained by using 2 n segments, that the true value is approximately equal to this, plus 1/3 the approximate value obtained 2 n segments, minus approximate value using n segments, that is the formula.  So if I choose n equal to 2, I get true value is approximately equal to the approximate value obtained using four segments, plus 1/3 the approximate value using four segments, minus the approximate value using two segments, and I have those numbers there anyway.  The four segment is 11113, plus 1/3, four segments is 11113, minus approximate value using two segments, is 11266, and the value which I obtain is 11062, that's what I obtain as the true value.  Again, this is an estimate of the true value by extrapolating, and basically what you are doing by using Richardson’s extrapolation formula, you are extrapolating to h being 0, or n being infinite, that's what you are trying to do by using the Richardson's extrapolation formula.  So if I write down a table, what I get by using . . . this is the number which I get by using two segments and four segments, I'm going to . . . so this is the number which I obtained by using two and four segments, so I'm going to show you what the numbers are obtained by using one and two segments, and two and four, which we just calculated, and four and eight.  So let's go ahead and look at what we're getting there. So we had 1, 2, 4, and 8, and this was the number which we had by using multiple segment trapezoidal rule, which was given to us, 11868, 11266, 11113, and 11074.  So we took these two numbers, and we got 11062.  In fact, if you take these two numbers, you get 11065, and if you take these two numbers, you get 11061. So you can do these, you can do this one as an exercise at home, you can do this exercise as your homework assignment, and find out if you agree with those two numbers, and in fact, the exact integral for this case is 11061, up to five significant digits. Now, I'm not saying that you're always going to get the exact value up to a certain number of digits by . . . certain number of significant digits by doing Richardson's extrapolation, but in this case, it does turn out to be that, once I take the values obtained by four and eight segments, that's the value which I get, which is same as the exact integral. So it's very important to understand that how this Richardson's extrapolation works, because it'll form then the basis for Romberg integration, which makes it even a better estimator of the integral itself.  But before I wrap up, I want to show you some of the things which we talked about, that how the true error changes.  So I'm going to go back and draw a table right here, so I'm going to show you the table which we had before, where we had n as the number of segments, and we had the approximate value using n segments, and we had 1, 2, 4, and 8, this was something which was given to us, right?  And we had 11868 here, and then we had 11266 here, then we had 11113 here, and then we had 111074 here, that's what we had as the approximate value of the integrals. Now what I'm going to do is I'm going to show you the true error here, I didn't want to illustrate this before we took the example, because that would have then created some confusion, because we are talking true errors now, but that's why I'm showing you at the end.  We know that the true value is exactly equal to 11061, up to five significant digits, so we use this true value to calculate what the true error is. The true error is here is -807, the true error is -205, the true error here is -51.5, and the true error here is -12.9. And what I want you to observe is that as you are doubling the number of segments, see what happens to this one, the true error here is almost one quarter of this one.  Then you go, again, double the number of segments, this true error here is about one quarter of that.  It's not exactly one quarter, because the true error is approximately proportional to 1 by n squared, and same thing here, as you are going here, from here to here, the true error is getting approximately quartered. So that's what the basis of the Richardson's extrapolation formula is.  We were able to show it in a previous segment, and how we derived the formula to show that the true error is approximately proportional to 1 by n squared.  Here we're just illustrating the fact with an example, that in fact that's what happens for most integrals. And that's the end of this segment.