Interpolation of a polynomial given values at certain points and (higher) derivatives at those points. (Generalized Lagrange Interpolation)

interpolation

Suppose we where given the following values of $P(x)$ : $P(1) = 2,
P'(1) = 3, P(2) = 1, P'(2) = -1, \text{ and } P''(2) = 1.$

How can we find a polynomial of degree less than 5 that satisfies these conditions using generalized Lagrange Interpolation?

I understand how regular Lagrange Interpolation works and I have tried to derive a method in a similar fashion but to no avail.

My current idea is to use the first few terms of the Taylor series:
$$P(x) = A(P(1) + P'(1)(x-1))+B(P(2) + P'(2)(x-2) + \frac{P''(2)(x-2)^2}{2!})$$
but I am struggling to determine $A$ and $B$.

Best Answer

I have solved this problem myself.

In the general case: Suppose we are given the values of $n$ derivatives at a given point $x=a$ and $m$ derivatives at a point $x=b$. That is, $$P(a) = k_1,P^{'}(a)=k_2, \dots, P^{(i)}(a)=k_i,\dots, P^{(n-1)}(a) = k_n$$ $$P(b) = l_1,P^{'}(b)=l_2, \dots, P^{(i)}(b)=l_i,\dots, P^{(n-1)}(b) = l_m$$

We have the Interpolation formula: $$P(x) = \frac{(x-a)^n}{(b-a)^n}\left( l_1 + l_2(x-a) + l_3 \frac{(x-a)^2}{2!} + \dots \right) + \frac{(x-c)^m}{(a-b)^m}\left( k_1 + k_2(x-a) + k_3 \frac{(x-a)^2}{2!} + \dots \right)$$

Where the terms inside the parentheses are the first $n$ and $m$ terms of the Taylor series respectively.