Find the values of $a$ and $b$ so that the polynomial $\left(x^{4}+a x^{3}-7 x^{2}-8 x+b\right)$ is exactly divisible by $(x+2)$ as well as $(x+3)$.
Let:
$f(x)=x^{4}+a x^{3}-7 x^{2}-8 x+b$
Now,
$x+2=0 \Rightarrow x=-2$
By the factor theorem, we can say:
$f(x)$ will be exactly divisible by $(x+2)$ if $f(-2)=0$.
Thus, we have:
$f(-2)=\left[(-2)^{4}+a \times(-2)^{3}-7 \times(-2)^{2}-8 \times(-2)+b\right]$
$=(16-8 a-28+16+b)$
$=(4-8 a+b)$
$\therefore f(-2)=0 \Rightarrow 8 a-b=4 \quad \ldots(1)$
Also,
$x+3=0 \Rightarrow x=-3$
By the factor theorem, we can say:
$f(x)$ will be exactly divisible by $(x+3)$ if $f(-3)=0$.
Thus, we have:
$f(-3)=\left[(-3)^{4}+a \times(-3)^{3}-7 \times(-3)^{2}-8 \times(-3)+b\right]$
$=(81-27 a-63+24+b)$
$=(42-27 a+b)$
$\therefore f(-3)=0 \Rightarrow 27 a-b=42 \ldots(2)$
Subtracting (1) from (2), we get :
$\Rightarrow 19 a=38$
$\Rightarrow a=2$
Putting the value of a, we get the value of b, i.e., 12.
$\therefore a=2$ and $b=12$