I'm trying to show the existence and uniqueness of an interpolating polynomial $p$ of degree less than or equal to 3 that interpolates a differentiable function $f$ ( i.e. $f(x_i) = p(x_i)$ for $i = 0, 1, 2 $ ) and it is also given that that $f'(x_1) = p'(x_1)$.
The way I'm approaching the problem is trying a polynomial of the type: $ p(x) = a_0 +a_1x + a_2x^2+a_3x^3 $ and solving for $a_0, a_1, a_2, a_3$. In this way, I have to show that the determinant of the matrix:
$ A = \begin{bmatrix}1& x_0 & x_0^2 &x_0^3\\1& x_1 & x_1^2 &x_1^3\\1& x_2 & x_2^2 &x_2^3 \\ 0 &1& 2x_1 & 3x_1^2 \end{bmatrix} $
is non-zero (for the system to be uniquely determined). I have calculated the value of the determinant using matlab, but the expression was pretty messy and it is not obvious to me that it must be non-zero (for different $x_0, x_1, x_2$).
Extra: How one can generalize that to a degree $n$ polynomial (i.e. to prove that given $n+1$ independent "conditions" there exists a unique polynomial that satisfies all of them).
You can note that $\det(A)=\left.\frac{\text{d}}{\text{d}t}\right|_{t=0}\,\det\big(B(t)\big)$, where $$B(t)=\begin{bmatrix}1& x_0 & x_0^2 &x_0^3\\1& x_1 & x_1^2 &x_1^3\\1& x_2 & x_2^2 &x_2^3 \\ 1 &x_1+t& (x_1+t)^2 & (x_1+t)^3 \end{bmatrix}\,.$$ It should be easy to find $\det\big(B(t)\big)$ (or see here), and then show that $\det(A)\neq 0$. (You should see that $\det\big(B(t)\big)=t\,q(t)$ for some polynomial $q$ such that $q(0)\neq 0$.)
Alternatively, prove the uniqueness by showing that any two polynomials $p$ and $\tilde{p}$ that satisfy your conditions must obey $$p(x)-\tilde{p}(x)=(x-x_1)^2(x-x_2)(x-x_3)\,r(x)$$ for some polynomial $r$. If $\deg(p)$ and $\deg(\tilde{p})$ are both at most $3$, then $r$ must be identically zero, whence $p=\tilde{p}$.
For the existence, let $L(x)$ be the Lagrange polynomial that interpolates the points $\big(x_1,f(x_1)\big)$, $\big(x_2,f(x_2)\big)$, and $\big(x_3,f(x_3)\big)$. Set $$p(x)=L(x)+k\,(x-x_1)(x-x_2)(x-x_3)\,.$$ Then, from $$f'(x_1)=p'(x_1)=L'(x_1)+k\,(x_1-x_2)(x_1-x_3)\,,$$ you can find $k$. Thus, $p(x)$ exists.