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

You simply write out a skeleton $(x^4+x^3+8x^2+ax+b)=(x^2+1)(cx^2+dx+e)$.
(1) comparing the $x^4$ term we must have $c=1$.
(2) comparing the $x^3$ term we have $d=1$.
(3) comparing the constant term $e=b$.
So we now have $(x^4+x^3+8x^2+ax+b)=(x^2+1)(x^2+x+b)$.
(4) comparing the $x^2$ term $8=b+1$, so $b=7$.
(5) comparing the $x$ term $a=1$.
Check: $x^4+x^3+8x^2+x+7=(x^2+1)(x^2+x+7)$.
With practice a lot of this is done in your head and it is all quite fast.
