Solve this by Matlab Write the matlab coding of the attached
Solve this by Matlab. Write the matlab coding of the attached question. used Newton\'s divided difference polynomial method.
Q. The upward velocity of a rocket is given as a function of time in Table 1. Determine the value of the velocity at t 16 seconds by using Newton\'s divided difference polynomial method. Table 1 Velocity as a function of time. t (s) 1 (t) mm/s) 0 10 227.04 15 362.78 20 517.35 22.5 602.97 30 901.67Solution
Assume that An interpolation is many times, where data is given only at discrete
points such as (x0, y0), (x1, y1),(x2, y2),....., (xn-2,yn-2),(xn-1,yn-1),(xn,yn).
A continuous function f(x)may be used to represent the n+1 data values with f(x) passing through the n+1 points.
Then one can find the value of y at any other values of x. This is called interpolation.
Extrapolation : In case, If x falls outside the range of x for which the data is given, It is no longer interpolation it is called as Extrapolation.
A Polynoial is a common choice of an interpolating function because polynomials are easy to Evaluate, Differentiate and integrate.
Polynomial Inter Polation : A polynomial Interpolation involves finding a polynomial of order n that process through n+1 Points.
One of the methods of interpolation is called Newton\'s Divided difference ploynomail method.
There are other methods include the direct method and Lagrangain interpolation method.
Newton\'s Divided Difference Polynomial Method :
To illustrate this method, Linear and quadratic interpolation is presented first. Then, the general form of newton\'s divided difference polynomial method is presented
Following diagram is the inter polation of discrete data
Figure 1 Interpolation of discrete data.
Figure 1 Interpolation of discrete data.
Linear Interpolation
Given (x0,y0) and (x1,y1), fit a linear interpolant throug the data.Here the name itself it is resembling that liner so remember y = f(x) and y1 = f(x1).
So the Linear Interpolant of f1(x) is as follows.
Given (x0,y0) and (x1,y1), fit a linear interpolant throug the data.Here the name itself it is resembling that liner so remember y = f(x) and y1 = f(x1).
So the Linear Interpolant of f1(x) is as follows.
f1(x) = b0+b1(x-x0)
assume x = x0
hence f1(x0)= f(x0) = b0+b1(x0-x0)
f(x0) = b0+b1(0)
f(x0) = b0
assume x = x1
f1(x1) = f(x1) = b0+b1(x1-x0)
here f(x0) = b0 from above substitute f(x0) value in the above formula
f(x1) = f(x0)+b1(x1-x0)
b1=( f(x1)-f(x0))/(x1-x0)
so b0 = f(x0)
b1 = (f(x1)-f(x0))/ (x1-x0)
Giving the linear interpomat as
f1(x) = b0+b1(x-x0)
Substitute b0 and b1 values from above
f1(x) = f(x0)+((f(x1)-f(x0))/(x1-x0))(x-x0)
In the given question we need to find the upward velocity of a rocket by newton\'s divided difference polynomial method.
case 1:
In this case we are finding the upward velocity at t = 16 using first order polynmial inrerpolation by newton\'s divided difference polynomial method.
From the above calculations for linear inter polation, the velocity is given by
v(t) = b0+b1(t-t0)
since we want to find the velocity at t = 16, and we are using a first order polynomial.we are choosing the 2 points that are closest to t =16 from the given list of values of t.
here we are choosing t = 15 and t =20
then t0 = 15, v(t0) = 362.78
t1 = 20, v(t1) = 517.35
Finding b0 Value :
as we know f(x0) = b0
here b0 = v(t0)
so b0 = 362.78
Finding b1 Value:
and we know b1 = (f(x1)-f(x0))/(x1-x0)
here b1 = (v(t1)-v(t0))/(t1-t0)
Substitute the values here.hence b1 = (517.35-362.78)/(20-15)
= 154.57/5
= 30.94
then t0 = 15, v(t0) = 362.78
t1 = 20, v(t1) = 517.35
Finding b0 Value :
as we know f(x0) = b0
here b0 = v(t0)
so b0 = 362.78
Finding b1 Value:
and we know b1 = (f(x1)-f(x0))/(x1-x0)
here b1 = (v(t1)-v(t0))/(t1-t0)
Substitute the values here.hence b1 = (517.35-362.78)/(20-15)
= 154.57/5
= 30.94
Case 2 : in this case we are finding the upward velocity of a rocket at t =16 using seconf order polynomial interpolation using newton\'s divided difference polynomial method.
Remember for quadratic interpolation, the velocity is given by
v(t) = b0+b1(t-t0) + b2(t-t0)(t-t1)
. Since we want to find the velocity at t = 16 and we are using a second order polynomial, we need to choose three data points that are close to t = 16 from the given list of values.
here t0= 10, t1=15,t2 = 20
so t0 = 10 and v(t0) = 227.04
t1 = 15, v(t1) = 362.78
t2 =20, v(t2) = 517.35
as we know for linear interpolation
b0 = v(t0)
= 227.04
b1 = (v(t1)-v(t0))/(t1-t0)
= (362.78-227.04)/(15-10)
= 135.74/5
= 27.148
b2 = (((v(t2)-v(t1))/(t2-t1))-((v(t1)-v(t0))/(t1-t0)))/(t2-t0)
substitute all the abve values in the above formula we wil ge= 0.37660
Genral Form of Newton\'s divided difference polynomial method.
Case 2 : in this case we are finding the upward velocity of a rocket at t =16 using seconf order polynomial interpolation using newton\'s divided difference polynomial method.
Remember for quadratic interpolation, the velocity is given by
v(t) = b0+b1(t-t0) + b2(t-t0)(t-t1)
. Since we want to find the velocity at t = 16 and we are using a second order polynomial, we need to choose three data points that are close to t = 16 from the given list of values.
here t0= 10, t1=15,t2 = 20
so t0 = 10 and v(t0) = 227.04
t1 = 15, v(t1) = 362.78
t2 =20, v(t2) = 517.35
as we know for linear interpolation
b0 = v(t0)
= 227.04
b1 = (v(t1)-v(t0))/(t1-t0)
= (362.78-227.04)/(15-10)
= 135.74/5
= 27.148
b2 = (((v(t2)-v(t1))/(t2-t1))-((v(t1)-v(t0))/(t1-t0)))/(t2-t0)
substitute all the abve values in the above formula we wil ge= 0.37660


