# Requirements for an integer root of cubic equation

If we have the quadratic equation $$a x^2 + b x + c = 0$$ with $$a,b,c$$ integers, then a requirement for $$x$$ to have an integer solution is for $$b^2 - 4ac$$ to be a square integer. This condition is necessary, but not sufficient. However it is simple enough to sometimes be useful when solving Diophantine equations.

Furthermore, note that this does not come from Vieta's formulas. While those are useful for other purposes, they do not yield a restrictive form in the integers like the condition on $$b^2 - 4ac$$ extracted from the general solution.

So with that introduction out of the way:
I would like to know if there are similar conditions for the cubic equation $$a x^3 + b x^2 + c x + d = 0.$$

In the quadratic case, if one root is integer, the other is at least rational. But in the cubic case, one root could be integer, with the others irrational or imaginary. So it looks like it would be harder to extract such a condition from the general solution (vanderbilt.edu, wikipedia). In particular, just like in casus irreducibilis where imaginary values will invariably show up during calculation of the roots even when all the roots are real, it seems inevitable that we could have irrationals like $$\sqrt{n}$$ show up only to cancel later in the calculation of an integer root.

So how can we extract from the general cubic solution some useful conditions on $$a,b,c,d$$ for an integer solution? Particularly nice, in analogy to the quadratic case, is if there is some term that is required to be a perfect cube.

• Can the coefficients be transcendental numbers for example? Commented Jan 30, 2019 at 19:49
• The coefficients $a,b,c,d$ are integers, and I'm looking for (analogous to the quadratic case) necessary conditions such that the cubic has at least one solution in the integers. If this just isn't possible, understanding why would also be interesting. Commented Jan 30, 2019 at 19:59
• But if the coefficients are integers, then what do you have against the rational root theorem that you don't want to use it? :D And it generalizes very nicely to higher degrees as well. Commented Jan 30, 2019 at 20:01
• Because all we might know is that they are integers. I don't want to derail things, but here is an actual example. Consider trying to find integer solutions to $3b^2 c^2 + 6abcd - 4b^3 d - 4c^3 a - a^2 d^2 = f$. Looking at this as a quadratic in $d$, I get a constraint that leads to the requirement there are two integers X,Y such that: $Y^2 = 4 X^3 - a^2 f$. Nice we've related existence of integer solutions of original equation to integer solutions of an elliptic curve. If I knew similar conditions for cubic equations, I could probably extract different requirements. Commented Jan 30, 2019 at 20:44
• That's interesting. What kind of transformations did you do to link the first quadratic equation to the elliptic curve? What are $X$ and $Y$? I think your question is a candidate for being asked on mathoverflow but I'm just thinking out loud. I'm not saying that you should, but it might be a good idea to do it. Commented Jan 30, 2019 at 20:53

As mentioned by stressed out, the rational root theorem is useful here. As stated, consider the general cubic equation

$$ax^3 + bx^2 + cx + d = 0 \tag{1}\label{eq1}$$

Also, have $$d \neq 0$$ since, otherwise, $$x = 0$$ is a root and \eqref{eq1} then reduces to a quadratic which you already know how to handle. As the Rational root theorem says, all rational roots of the form $$x = p/q$$, where $$p$$ and $$q$$ are in lowest terms, require that $$p \mid d$$ and $$q \mid a$$. The integral solutions, of course, would be a subset of this where $$q = 1$$. As such, just consider $$p$$ being a root. Also, $$p \mid d$$ means there is some integer $$e \neq 0$$ such that

$$d = pe \tag{2}\label{eq2}$$

Substituting $$x = p$$ and \eqref{eq2} into \eqref{eq1}, then dividing by $$p$$, gives

$$ap^2 + bp + \left(c + e\right) = 0 \tag{3}\label{eq3}$$

Treating $$e$$ as a constant for now, this is a quadratic equation in $$p$$. Thus, using the quadratic formula means there is only possibly such an integer $$p$$ if

$$b^2 - 4a\left(c + e\right) = f^2 \tag{4}\label{eq4}$$

is a perfect square, i.e., $$f$$ is an integer. As such, you just need to check the various divisors (both positive & negative) $$e$$ of $$d$$ in \eqref{eq4}.

I don't believe this is quite what you're looking for, but I'm not sure if you will be able to find anything much better, especially just one specific equation to check. This is because any such alternative formulation would need to basically be equivalent to \eqref{eq4} which generally has several values to check. Nonetheless, I could definitely be wrong, with somebody providing a simpler formulation for you to use.

• I doubt this answer could be improved. I would accept. Note that putting boundaries on the integer solutions and using mod arithmetic might be better in practice in some cases but that would require clever choices and not be a general method
– mick
Commented Jun 16, 2019 at 12:36