There is a problem i'm finding quite difficult to solve, i'd be grateful if anyone could point me to the solution :
We want to interpolate the function $f(x)$ and it's derivative $f'(x)$ s.t $f(x_0)=P_2(x_0), f'(x_1)=P_2'(x_1 )$ and $f(x_2)=P_2(x_2 )$
Assuming $x_0 \ne x_2 $ , prove there exists one and only $P_2(x)$ iff $x_1\ne (x_0+x_1)/2$
I'd mention that representing $P_2(x)$ in the standard form is recommended.
Some hints:
Let $P_2(x) := ax^2 + bx + c$, then we have $P_2'(x) = 2ax + b$. So for $x_0 \neq x_2$:
\begin{align} \begin{bmatrix} x_0^2 & x_0 & 1 \\ 2x_1 & 1 & 0 \\ x_2^2 & x_2 & 1\ \end{bmatrix}\begin{bmatrix} a \\ b\\ c \\ \end{bmatrix} = \begin{bmatrix} f(x_0) \\ f'(x_1)\\ f(x_2) \\ \end{bmatrix} \end{align} We have \begin{align} \det \begin{bmatrix} x_0^2 & x_0 & 1 \\ 2x_1 & 1 & 0 \\ x_2^2 & x_2 & 1\ \end{bmatrix} = x_0^2 - 2x_0x_1 + 2x_1x_2 - x_2^2 \end{align} So for $x_1= \frac{x_0+x_2}{2}$: \begin{align} x_0^2 - 2x_0x_1 + 2x_1x_2 - x_2^2 = x_0^2 - x_0^2 - x_0x_2 + x_2x_0 + x_2^2 - x_2^2 = 0 \end{align} Which means that for $x_1= \frac{x_0+x_2}{2}$ there is no solution for your interpolation problem.