$P(x)=x^3+mx^2+nx+14$ is divisible by $(x+2)$ but leaves a remainder of $-20$ when it is divided by $(x-2)$. Find the values of $m$ and $n$. Hence, factorise the polynomial completely.
Now, I get $m=-6$ and $n=-9$ but when I factorise the polynomial, the answer is $P(x)=(x+2)(x-2).(x^2-6x-5)+0$. Is it correct?
As $(x+2)$ is a factor, $$\begin{align} P(x)=x^3+mx^2+nx+14&=(x+2)(x^2+ax+7)\\ &\Rightarrow \begin{cases} m=2+a\\n=2a+7\end{cases} \end{align}$$
As dividing by $(x-2)$ gives a remainder of $-20$, $$\begin{align} P(2)=8+4m+2n+14&=-20\\ 4+2m+n+17&=0\\ 4+2(2+a)+(2a+7)+17&+0\\ 4a&=-32\\ a&=-8\\ &\Rightarrow m=-6, n=-9\qquad \blacksquare\end{align}$$ Note that $$\begin{align} P(x)&=(x+2)(x^2-8x+7)=(x+2)(x-7)(x-1)\\ &=x^3-6x^2-9x+14\end{align}$$