Find a polynomial of degree smaller than five such that:
$P(1)=2$, $P(2)=-1$, $P'(2)=-1$,$P'(1)=3$,$P''(2)=1$
I know I need to use a combination of Lagrange Interpolation and Taylor series but the notes i have a very unclear on this and any help would be appreciated.
If you don't know how to mix these two methods =, you can always solve it the hard way, by defining $P(X)=aX^4+bX^3+cX^2+dX+e $, and write the above conditions as a system and solve in terms of $(a,b,c,d,e)$, here is what it looks like in terms of matrices :
$$\underbrace{\begin{pmatrix} 1 & 1 &1&1&1\\16&8&4&2&1\\4&3&2&1&0\\32&12&4&1&0\\48&12&2&0&0 \end{pmatrix}}_{A} \cdot\begin{pmatrix}a\\b\\c\\d\\e \end{pmatrix}=\underbrace{\begin{pmatrix}2\\-1\\3\\-1\\1 \end{pmatrix}}_{B}$$
Then you can compute $A^{-1}$ and then compute $A^{-1}\times B $ :
$$A^{-1}=\begin{pmatrix}-3&3&-1&-2&0.5\\20&-20&7&13&-3\\-48&48&-18&-30&6.5\\48&-48&20&29&-6\\-16&17&-8&-10&2 \end{pmatrix} $$
Finally, you get :
$$\boxed{\begin{pmatrix}a\\b\\c\\d\\e \end{pmatrix}=\begin{pmatrix}-9.5\\65\\-161.5\\169\\-61 \end{pmatrix} }$$