CHAPTER 05.02: DIRECT METHOD OF INTERPOLATION: Cubic Interpolation: Part 2 of 2   Let's extend this example on cubic interpolation in this segment. So let's suppose somebody has given . . . that we are given the value of the velocity as a function of time at different times. So we're given 0, 0, 10, 227.04, at 15, at 20, at 22.5, and at 30.  And what we find out is that if we want to find the velocity at 16, we choose these four data points, and the cubic interpolant which I get for the velocity turns out to be as follows, -4.3810, plus 21.289 t, plus 0.13065 t squared, plus 0.0054606 t cubed, and of course, this is valid between 10 and 20, that's very important to realize that when you are doing interpolation that you are not only finding out what the interpolant is, but also the domain in which that interpolant is valid. What we are trying to do in this example is that we already found out what the value of the velocity at 16 is, which turns out to be 392.06, and what we want to do is that many times in interpolation you will not be just simply asked to find out what the value of the velocity, or what the value of the function is at a particular time, or a particular x value which is not given to you, but also you might have to do other operations on it.  So for example, if somebody tells you to find . . . find the distance covered by the rocket between t equal to 11 and 16 seconds.  So in this case, we are not asked to find out what the velocity at 16 is, but what is the distance covered from 11 to 16? So what that means is that we have to integrate the expression.  So if we want to find out what the distance covered between 16 and 11 is, what that means is that we have to integrate the expression for the velocity, from 11 to 16.  So you've got to go beyond just simply substituting the value of the independent variable to find out what the value of the dependent variable is.  So I'll just simply integrate from 11 to 16, and since this is a third-order polynomial, I can go ahead and use my integral calculus knowledge to do the integration. So what this is, the integrand itself is simply a polynomial, and we know how to integrate polynomials in integral calculus by using the formula that you have x raised to the power n dx is equal to x raised to the power n plus 1, divided by n plus 1, plus the constant of integration, and of course n has to be greater than or equal to 0, or we can say n is not equal to 1, that might be a better . . . n is not equal to -1, that'll be a better range for this. So we can use this concept of that the integral of x raised to the power n is equal to x raised to the power n plus 1, divided by n plus 1, plus the constant of integration, and apply it there. So what we're going to get from here will be the distance covered, which will be 1605 meters.  So that's what you are estimating for the distance covered by the rocket between 11 and 16 seconds. Now, another phase of this particular problem could be to find acceleration.  So let's suppose somebody says, hey, find acceleration at t equal to 16 seconds.  So what that implies is that we are given the velocity expression, we have to differentiate the velocity expression to get the acceleration. So I'm going to write down my velocity, which is -4.3810, plus 21.289 t, plus 0.13065 t squared, plus 0.0054606 t cubed.  Again, this particular interpolant is valid between 10 and 20, so I can use it to be able to find out what the value of the acceleration at 16 is, but in order to be able to do that, I'll have to take the derivative of the velocity, and the derivative of this velocity will be then, this will be 0, the derivative of t is just 1, and then it will be the derivative of t squared will be 2 t, and of course the derivative of t cubed, which is 0.0054606 will be 3 t squared.  So you are basically differentiating each of the individual terms of the third-order polynomial, this will give you 0, this will give you 1, so that's why it's 21.289, this will give you 2 times t, right there, and this t cubed will give you 3 times t squared.  Again, this expression for acceleration is valid between 10 and 20. So I find out what the acceleration at 16 is by simply substituting 16.  I get 21.289, plus 0.13065 times 2 times 16, plus 0.0054606 times 3 times 16 squared, and this value here turns out to be 29.664 meters per second squared.  So in this segment, what I have shown you is that how you can use the concepts of integral calculus and differential calculus to be able to go beyond what interpolation asks you to do, to be able to find out other things which people are asking you to find.  So in this case velocity was given as a function of time, and you are then using the interpolant of the velocity to find out the distance covered from one point to another, and to find the acceleration at a particular time. And that's the end of this segment.