Find the values of a and b so that $x^4+x^3+8x^2+ax+b$ is exactly divisible by $x^2+1$ I have been trying this question for a long time but I am not getting it. So please help me and try to make it as fast as possible

Long division gives 
$$
\frac{x^4+x^3+8x^2+ax+b}{x^2+1}=x^2+x+7+\frac{(a-1)x+b-7}{x^2+1}
$$
Therefore, the remainder is zero iff $(a-1)x+b-7$ is the zero polynomial, that is, iff 
$$
.\begin{cases}
a-1=0\\
b-7=0\\
\end{cases}
$$
Hence, for $a=1$ and $b=7$, we have that $x^4+x^3+8x^2+ax+b$ is divisible by $x^2+1$. 
