<s>[INST] integer $m$ for which $x^3-mx^2-mx-(m^2+1)=0\Rightarrow m^2+m(x^2+x)-x^3+1=0$ has integer roots Calculation of all integer values of $m$ for which the equation
$p(x)=x^3-mx^2-mx-(m^2+1)$ has integer roots.
$\bf{My\; Try}::$ Given $x^3-mx^2-mx-(m^2+1)=0\Rightarrow m^2+m(x^2+x)-x^3+1=0$
for integer roots(i.e $x\in \mathbb{Z}$), discriminant of quadratic equation must be perfect square.
So $(x^2+x)^2+4(x^3-1)=k^2$
Now How can i solve after that
help Required
Thanks
 [/INST] $\frac{-(x^2+x) \pm \sqrt{(x^2+x)^2+4(x^3-1)}}{2} = n$ where $n$ is an integer.
$\Rightarrow 4n^2 + (x^2+x)^2 + 4n(x^2+x) = 4(x^3-1) + (x^2+x)^2$
$\Rightarrow n^2+ n(x^2+x) = x^3-1$
$\Rightarrow n(n+x^2+x) = (x-1)(x^2+x+1)$
Hint:
For what integer values of n and x are the LHS and RHS equal?
</s>