a) Show that if $P(x)$ is a polynomial such that $P(a)=P'(a)=0$ then there exists a polynomial $Q(x)$ such that $P(x)=(x-a)^2Q(x).$
I know that the tangent line to P at a is horizontal at (a,0), which means (x-a) is a factor of P, but I can't seem to prove if $(x-a)^2$ is a factor of P.
Differentiate, $$ P'(x)= 2 (x-a) Q(x)+(x-a)^2 Q'(x) $$ at $x=a$ $$ P'(a)=0$$ for all $Q,Q'$