CHAPTER 07.06: DISCRETE DATA INTEGRATION: via Polynomial Interpolation
In this segment, we're going to talk about how to integrate discrete functions. and the approach we're going to take to integrate discrete functions is the polynomial interpolation approach. and we're going to discuss this topic by taking an example. So let's suppose somebody tells you that you are given velocity as a function of time. So you're given velocity as a function of time for a rocket, and you're given time in seconds, velocity in meters per second, and the data which is given is as follows, that it's 0 to 0, at 10 it is 227.04, at 15 it is 362.78, at 20 it is 517.35, and at 22.5 it is 602.97, and at 30 it is 901.67. And let's suppose you're asked to find out what is the distance covered by this rocket from the time of t equal to 11 seconds to 16 seconds? So for that, what you're going to do is you are going to integrate the velocity expression from 11 to 16, however, we are not given a velocity expression, we are only given velocity at discrete data points, in this case being the six data points, but we're asked to find out what is the distance covered from 11 to 16 seconds. So what the polynomial interpolation method is all about is to be able to choose the correct points to be able to do this integration. Now, since we are doing polynomial interpretation, you might be able to use a first-order polynomial, second-order polynomial, and so on and so forth, but let's go ahead and see that what kind of polynomial will be the best one . . . maybe not the best one, let's suppose, the appropriate one to use. Now, you are integrating from 11 to 16, and you know the value of the velocity at 10, you know the value of the velocity at 15, you know the value of the velocity at 20, and that seems to encompass the lower limit of 11 to 16, so I'm going to choose these three data points for calculating my distance covered from . . . of the rocket from 11 to 16 seconds. So 11 is somewhere between 10 and 15, and 16 is between 15 and 20, so that takes the three points. I can take more points to approximate the velocity expression, but let me just choose 10, 15, and 20, because 11 to 16 falls in that range, and gives me a . . . it will give me a second-order polynomial. I have three data points, 10 . . . at time, t equal to 10, 15, and 20, and that will give me a second-order polynomial which I will be able to calculate from there. So let's go ahead and see how we're going to go about doing that. So what I am basically trying to do is I'm going to try to find out a velocity expression, a polynomial expression for velocity. So I'm going to say, okay, what I'm going to do is, since I have chosen two points . . . three points, I'm going to approximate it by a third-order . . . by a second-order polynomial, by a second-order polynomial which looks like this, and since the data points which I have chosen are 10, 15, and 20, those are the three data points which I chose for my calculation of the velocity expression. At 10 it is 227.04, at 15 it is 362.78, and at 20 it is 517.35. This particular expression will be valid between 10 and 20, although I'm trying to find out what the value of the integral is from 11 to 16, the velocity expression will be valid from 10 to 20. So what I will have to do is I will have to set up three equations, three unknowns, because I know the value of the velocity at three points, this is my time and this is my velocity, so I know the value of velocity at three different points, so I can use that to calculate my second-order polynomial. So my velocity at 10, for example, is 227.04, so that gives me a0, and I will substitute for t, I'll substitute 10. And then the velocity at 15 is 362.78, and that gives me the time as 15. And then this velocity at 20, and that's 517.35, and in here, this is the velocity at 20, so I'm going to substitute 20 for time, a1 times 20, plus a2 times 20 squared. So what I am getting here is that I'm getting three equations, three unknowns, because I know the value of the velocity at 10, 15, and 20. So I'll be able to set up these three equations and three unknowns, and let me write them in the matrix form, because, since we are talking about numerical methods, you should by now know how to solve simultaneous linear equations by any of the methods which you have learned, such as Gauss elimination, or Gauss-Seidel method, or LU decomposition method. So a0, a1, and a2 are the three unknowns, so the coefficient matrix, first row is 1, 10, and 100, then 1, 15, and 225, and then 1, 20, and 400, and the right-hand sides are basically these known quantities of velocity, 227.04, 362.78, and 517.35. I'm going to solve these three equations, three unknowns, and I will be able to find out what a0, a1, and a2 are, so I'm going to leave that as homework. Find a0, a1, a2, I'm going to leave that as homework, that you're going to find out a0, a1, and a2 by any method of your choice, and eventually what you're going to get, you're going to get a0 equal to 12.05, you're going to get a1 equal to 17.73, and you're going to get a2 equal to 0.3766. So those are eventually the values of a0, a1, and a2 you're going to get in the velocity expression, which makes the velocity expression now to be a0, plus a1 times t, plus a2 times t squared, of course, it's valid between 10 and 20, and that gives me 12.05 here, plus 17.73 t, plus 0.3766 t squared, valid between the points 10 and 20. However, what I want to do is I want to find out the value of the distance covered by the rocket from 11 to 16 seconds. So I'm going to integrate my velocity expression from 11 to 16. So I'll integrate whatever I just found, the second-order polynomial which I just found, I'm going to integrate that with respect to time, and my lower limit is 11 and upper limit is 16, because that's what I want to find, I want to find the distance covered from 11 to 16 seconds. So now I can use my knowledge of integral calculus to be able to find this integral. So that turns out to be, so my integral from 11 to 16, v of t dt is approximately equal to if I integrate that, I get 12.05 t, plus 17.73 t squared by 2, plus 0.3766 t cubed divided by 3, and of course, the lower limit is 11, and the upper limit is 16, so those I'll have to substitute in there. And I will get 12.05, upper limit is 16, lower limit is 11, then 17.73, upper limit is 16 squared, lower limit is 11 squared, I'll get that then 0.3766, upper limit is 16, lower limit is 11, divided by 2, and I get 1604 meters. So that's what I get as the distance covered from, of the body, from 11 to 16 seconds. And that's the end of this segment. |