Finding an unknown coefficient of a polynomial given a factor Q:Find the value of $a$ given that $x^2+1$ is a factor of $x^4-3x^3+3x^2+ax+2$
No idea where to start, I was going to use the factor theorem but it didn't work out. 
Question from year 10 Cambridge maths textbook

\begin{align}
x^4-3x^3+3x^2+ax+2 &= (x^4 + x^2) - 3 \, (x^3 + x) + 2 \, (x^2 + 1) + (a+3) \, x  \\
&= (x^2 + 1) \, \left( x^2 - 3 \, x + 2 + \frac{(a+3) \, x}{x^2 + 1} \right)
\end{align}
In order for this to be factored then it is required that $a = -3$.
