# Find $m \in \mathbb{Z}$ for which $x_1$ and $x_2$ are integers

$$(m+1)x^2 - (2m+1)x - 2m = 0$$ $$m \in \mathbb{R}-\{-1\}$$

Find $m \in \mathbb{Z}$ for which $x_1$ and $x_2$ (the solutions of equation, the roots) are integers ($x_1,x_2 \in \mathbb{Z}$)

I tried to make it as follows but I am unsure if it is correct. Please tell me if I am wrong (| means divide - I don't know exactly english terms and symbols, please ask me if you don't understand):

If $m\in\mathbb{Z}$ then:

$m+1 \in \mathbb{Z} \\ -2(m+1) \in \mathbb{Z} \\ -2m \in \mathbb{Z}$

$\Rightarrow x_{1,2} = \frac{p}{q}, where \ p|(-2m) \ and \ q|(m+1)$

$but \ x_{1,2} \in \mathbb{Z} \Rightarrow (m+1)|(-2m)$

$\Rightarrow \frac{2m}{m+1} \in \mathbb{Z} \Rightarrow \frac{m+m+1-1}{m+1} = 1 + \frac{m-1+1-1}{m+1} = 2 - \frac{2}{m+1}$

$D_2 = \{\pm1, \pm2\}$

$1.\ m+1 = -1 \Rightarrow m = -2$

$2.\ m+1 = 1 \Rightarrow m = 0$

$3.\ m+1 = -2 \Rightarrow m = -3$

$4.\ m+1 = 2 \Rightarrow m = 1$

And after that I verified all $m \in \{-3,-2,0,1\}$ in the equation above and then finded only $m \in \{-2,0\}$ as for $x_{1,2} \in \mathbb{Z}$

Please tell me if the demonstration before is enough and if is there any other method of finding m.

Thank you!

PS: Please ask me all you don't understand and help me to correct the question, if I am wrong. Also, I think title is not describing well what I am asking but I don't know what to say about. Thank you!

The following is an alternative procedure to arrive at your solution. If $x_{1}$ and $x_{2}$ are the solutions of the equation
From the above equations, it is clear that if $x_{1}$ and $x_{2}$ have to be integers, the only possibilities for $m$ are $m=0$ and $m=-2$.