VietaTheorem Intermediate

Problem - 3326
Find integer $m$ such that the equation $x^2+mx-m+1=0$ has two positive integer roots.

Let $x_1$ and $x_2$ be the two roots of $x^2+mx+m+1=0$. Without loss of generality, let's assume $x_1 \ge x_2$. Then by Vieta's theorem, we have $$ \left\{ \begin{array}{ccc} x_1 + x_2 &=& m\\ x_1 \cdot x_2 &=& m+1 \end{array} \right. $$ Canceling $m$ leads to $$x_1x_2 -x_1-x_2=1\implies (x_1-1)(x_2-1)=2$$ Because both $x_1$ and $x_2$ are positive integers, $x_1 \ge x_2$. The above equation can hold if and only if $(x_1-1)=2$ and $(x_2-1)=1$. Or $x_1 = 3$ and $x_2 =2$. It follows that $m=-(x_1+x_2)=\boxed{-5}$.

report an error