Non-constant cubic spline interval

39 Views Asked by At

I have the following Numerical Methods homework question that I am working on.

Question: The velocity profile of a rocket against time is give as below \begin{array}{c|ccccc} \bf t & 0& 10& 15& 20& 22.5&6 30 \\ \hline \bf v(t)& 0& 227.04& 362.78& 517.35& 602.92& 901.67 \end{array}

Using cubic splines (6 data points so all possible cubic splines will be 5) to compute

1. Velocity at t=16 seconds

2. Acceleration at t=21 seconds

3. Distance travelled by rocket between t=23 and t=29.

Here, the interval "h" between the time values isn't constant, whereas all the examples in my slides and the ones I have found online have a constant h like 0,10,15,20, etc. How do I solve such a question with varying interval? Also, should part 2 and 3 of the question be done by differentiating and integrating the equations I will find for whatever interval the t value falls in? Should I be using numerical differentiation/integration (it doesn't specify)?