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
 A: 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$. 
A: Hint: If $x^4+x^3+8x^2+ax+b$ is divisible by $x^2+1$, then there is a polynomial $Q(x)$ such that $$x^4+x^3+8x^2+ax+b = (x^2+1)Q(x)$$ for all complex numbers $x$. 
Now plug in $x = i$ and $x = -i$ and see what you get.
A: 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.
A: Method 1.
Subtracting $x^2(x^2+1)$ from $x^4+x^3+8x^2+a x+b$ gives $x^3+7 x^2 +a x+b.$
Subtracting $x(x^2+1)$ from $x^3+7 x^2+a x+b$ gives $7 x^2+(a-1)x+b.$
Subtracting $7(x^2+1)$ from $7 x^2+(a-1)x+b$ gives $(a-1)x+(b-7).$
Observe that $(a-1)x+(b-7)=0$ for every $x$ if and only if $a=1$ and $b=7.$
Method 2.
$f(x)=x^4+x^3+8 x^2+a x+b$ is divisible by $x^2+1$ if   $f(i)=f(-i)=0,$ where $i^2+1=0.$
We have $i^3=i(i^2)=i(-1)=-i$ , and $i^4=(i^2)^2=(-1)^2=1.$
So $f(i)=(b-7)+i(a-1)$ and $f(-i)=(b-7)-i(a-1).$ 
These are both $0$ if and only if $b-7=a-1=0.$
