If $x_1$ and $x_2$ are the roots of this quadratic equation, then by Vieta's formulas, $x_1 + x_2 = -m$ and $x_1 x_2 = 3m + 1$.
If one of the roots is an integer, then $x_1 x_2$ must also be an integer. Since $3m + 1$ is an integer, it follows that $m$ must also be an integer.
Let $y = x_1 + 1$. Then the given quadratic equation rewrites as
\[(y-1)^2 + m(y-1) + 3m + 1 = 0,\quad\text{or } y^2 + (m-2)y + (3m-m^2-1) = 0.\]
Substituting $y+1$ for $x$, $-2-m$ for $m$, and $-3m-m^2-1$ for $3m-m^2-1$, we see that $y+1$ is a root of this equation if and only if $y=x_1+1$ is a root of the original equation.
Thus $x+y=-m+2y$ must be an integer. By Vieta's formulas, it follows that $y$ is an integer if and only if $x+y$ is an integer.
So we need $y+1$ to be an integer root of the equation $y^2 + (m-2)y + (3m-m^2-1) = 0$.
Together with the given, this means that 1 is an integer root of the quadratic equation,
so $0 + (m-2)(0) + (3m-m^2-1) = 0$.
Then $m^2 - 4m - 1 = 0$, and the possible values of $m$ can be found by the quadratic formula:
\[m = \frac{4 \pm \sqrt{4^2 - 4 \cdot (-1)}}{2} = 2 \pm \sqrt5.\]
Hence the sum of all such $m$ is $2 - \sqrt5 + 2 + \sqrt5 = \boxed{4}$.
Let $m$ be an integer. If the quadratic equation $x^2 + mx + 3m +1 = 0$ has one or more integer roots, then find the sum of all possible values of $m$.
1 answer