Find all integer values for $m$ such that $x_1,x_2\in\mathbb{Z}$ We have $(m+1)x^2-(2m+1)x-2m=0$ where $m\in\mathbb{R}\backslash\left\{-1\right\}$. We need to find all integer values for $m$ such that both roots of the equation are integers.
Here is all my steps:


*

*$x_{1,2}=\frac{(2m+1)\pm\sqrt{12m^2+12m+1}}{2(m+1)}\in\mathbb{Z}$
$\Rightarrow 2(m+1)\:|\:(2m+1)\pm\sqrt{12m^2+12m+1}$
$\Rightarrow 2(2m+2)+1\pm\sqrt{12(2m+2)^2+12(2m+2)+1}=0$

*$x_1=2(2m+2)+1+\sqrt{12(2m+2)^2+12(2m+2)+1}=0$
$\Rightarrow \sqrt{12(2m+2)^2+12(2m+2)+1}=-4m-5$
$\Rightarrow 12(2m+2)^2+12(2m+2)+1=(-4m-5)^2$
$\Rightarrow 12(4m^2+8m+4)+24m+25=16m^2-40m+25$
$\Rightarrow 48m^2+96m+48+24m+25=16m^2-40m+25$
$\Rightarrow 32m^2+160m+48=0$|:16
$\Rightarrow 2m^2+10m+3=0$ but $\sqrt{\Delta}\notin\mathbb{N}$
Now we have to verify for $x_2$ like above:


*

*$x_2=48m^2+96m+48+24m+25=16m^2+40m+25$


$\Rightarrow 32m^2+80m+48=0|:16$
$\Rightarrow 2m^2+5m+3=0 \Rightarrow \sqrt{\Delta}=1$
$\Rightarrow m_1=-1\in\mathbb{Z}, m_2\notin\mathbb{Z}$

But as the author says $m\in\mathbb{R}\backslash\left\{-1\right\}$

 A: I'm sorry, but I find as the only answers $m=0$ or $m=-2$ or $m=-1$ (though in the latter case there are not two solutions).
To see this, note that if $m=-1$, it' not a quadratic equation, and the  solution is $x=-2$.
If $m\neq -1$, let $x_1, x_2$ be the roots; use Vieta's relations:
$$x_1x_2=-\frac{2m}{m+1},\quad x_1+x_2=\frac{2m+1}{m+1}.$$
If $m, x_1,x_2$ are integers, this implies $m+1$ divides both $2m$ and $2m+1$, hence it divides $1$, whence $m+1=\pm 1\iff m=0,-2$.
For $m=0$, the equation is $\;x^2-x=0$, which has roots $0,1$.
For $m=-2$, the equation is $\;-x^2+3x+4=0$, which has roots $-1,4$.
A: Let's express $x$:
$$
-m = \frac{x^2-x}{x^2-2x-2}.
$$
So,
$$
-m - 1 = \frac{x+2}{x^2-2x-2}.
$$
Denominator never equal to $0$ for integers $x$. If $|x+2|<|x^2-2x-2|$, $m$ cannot be integer (unless $x=-2$; we'll check this case later). Solve this inequality:
$$
|x+2|<|x^2-2x-2|\Leftrightarrow (x^2-2x-2)^2 - (x+2)^2 > 0 \Leftrightarrow x^4 - 4x^3 + 4x - x^2 > 0
$$
But
$$
x^4 - 4x^3 + 4x - x^2 = x(x-1)(x+1)(x-4).
$$
Hence, if $x>4$ or $x<-1$, $m$ cannot be integer. Now we just should check integers $-2\le x\le 4$ (don't forget about $x=-2$).


*

*$x=-2$, $m=-1$

*$x=-1$, $m=-2$

*$x=0$, $m=0$

*$x=1$, $m=0$

*$x=2$, $m=1$

*$x=3$, $m=-6$

*$x=4$, $m=-2$


Excluding $m=-1$, possible $m$ are
$$
-6, -2, 0, 1.
$$
But both roots must be integers; so, $\boxed{m=-2}$ or $\boxed{m=0}$.
