<s>[INST] 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
 [/INST] 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.$
</s>