CHAPTER 05.03: NEWTON DIVIDED DIFFERENCE METHOD: Newton's Divided Difference Polynomial: Linear Interpolation: Example
In this segment, we're going to take an example for the Newton's divided difference polynomial method, and we're going to take the example for linear interpolation. So how do we do linear interpolation by using Newton's divided difference polynomial method? So let's suppose somebody, this is the example, so somebody's giving you velocity as a function of time. Time is given in seconds, velocity is given in meters per second for this rocket, the upward velocity is given to you, it is given as 0, 0, 10, 362.78 at 15, at 20 it is 517.35, at 22.5 it is 602.97, and at 30 it is 901.67. So these are the numbers which are given to us, and we are asked to do linear interpolation based on the fact that we want to find what the value of the velocity at 16 is. So we want to use linear interpolation, we want to use Newton's divided difference polynomial method. We are given six data points, and we want to find out what the value of the velocity at 16 seconds is. So again, as we were talking about when we were deriving Newton's divided difference polynomial, we talked about that, hey, rather than posing the problem as given two points, do the linear interpolation, we said chosen two data points, because in most cases you won't just have two data points, but you will have a number of data points, so you have to come up with a scheme to choose it. For linear interpolation, it's pretty simple, because all you have to do is to figure out that the point at which you are interested in finding out the intermediate value, that the numbers have to be between . . . that the number has to be between the two data points, and closest to them. So 16, it is between 15 and 20, and it is also at the same time these are the two closest t values which you have, so that's why we're choosing 15 and 20. We're not choosing 10 and 20, for example, because 15 is closer to 16 than 10 is. So it's pretty straightforward. So you have to find out the immediate bracket, immediate two data values which bracket your value of the velocity at 16. I also want to emphasize that these data points which are given to you here, although we are giving them in an ascending order, so far as the time is concerned, going from 0 to 30 for Newton's divided difference polynomial method, or direct method, or Lagrangian interpolation, it is not required for these data points to be in any kind of ascending or descending order. So it's extremely important to realize that. A lot of people think that that is the case. You do have to put them in ascending order if you are doing something called spline interpolation. So let's go ahead and see that how we're going to apply Newton's divided difference polynomial method to this particular problem. So we know that the velocity v1 t, which is standing for the first-order polynomial, will be like, the form will be b0, plus b1 times t minus t1, where b0 is the value of the function at the first data points, and b1 is the slope between the two data points of t0 and t1, so we get this. So in our case, what we have is that . . . so let's go ahead and write down what t0 is, t0 is 15 the value of the velocity at t0, which is one of the data points which is given to us, is 362.78 meters per second. The value of the velocity at 20 is given to us, that's v of t1 is given to us as 517.35 meters per second. So based on this information which we already have, we should be able to find b0 and b1. So b0 is nothing but the velocity at t0, which is 362.78, which is right here, and b1 is the velocity at t1 minus the velocity of t0, divided by t1 minus t0, and this one is equal to v of t1 is 517.35, the value of the velocity at t0 is 362.78, and we divide it by t1 minus t0, which is . . . no, this is t1, t1 minus t0, which is 20 minus 15. So based on this we should be able to find out what b1 is, and we are able to find b1 to be equal to 30.914. So we have the value of b1, we have the value of b0, so we should be able to write down the first-order polynomial which we have, and that first-order polynomial, again, as we said is of the form b0, plus b1 times t minus t0, and b0 is 362.78, plus b1, which is 30.914, times t minus t0, which is 15. So this is what turns out to be the first-order polynomial, which is valid between 15 and 20. So again I want to emphasize another point is that whenever you are going to write interpolants which are . . . which you are finding by using any of the methods, that you do give the domain in which that interpolant is valid. So since we have used 15 and 20 as the two data points, that means that this interpolant which we just found out is valid between the points of time of 15 and 20. However, what we are interested in is finding out what the value of the velocity is, approximate value of velocity is at 16, which we can just obtain by simply substituting 16 in here, 30.914 times 16 minus 15, and this number here turns out to be equal to 393.69 meters per second, so that's our approximation. Now, one of the things which I do want to mention is that this is a first-order polynomial, this is the same first-order polynomial which you would have obtained by using the direct method. So if I expand this particular polynomial, I will get v1 t, if I just expand this by simply multiplying this to this and this to this, I would get -100.93, plus 30.914 t, and this particular interpolant is the same interpolant which I got by using direct method. So there's no difference, because the polynomial has to be unique, so there's no difference between this polynomial which I would have obtained by using direct method and this polynomial right here. Just the form is different, as you saw that the reason why we're writing in this particular form is because calculating the value of b0 and b1 do not require us to solve simultaneous linear equations. And that's the end of this example. |