I need to construct a 6 degree polynomial given some data points and their derivatives:
Say if I have points their corresponding values and derivatives: $$p(x_0)=p_0, p(x_1)=p_1, p'(x_1)=p'_1, p(x_2)=p_2, p'(x_2)=p'_2, p''(x_2)=p''_2, p(x_3)=p_3$$
So using the fact that $$p[x_0,...x_n]=\frac{p^{(n)}(x_n)}{n!}$$
We get:
Newtons polynomial: $p_1+p'_1(x-x_0)+p''_2(x-x_0)(x-x_1)$ And then I am stuck. How can I find the divided difference of $p[x_0...x_3]$? And how will I get the 6th degree polynomial if the max degree will be 3?
You're looking for Hermite interpolation.
The general idea is that, when you're constructing your divided difference table, whenever you have to fix the first $k$ derivatives of point, you repeat that point $k+1$ times in the leftmost column of the table and replace succeeding ambiguous divided differences by derivatives.