The number of integers $k$ for which the equation $x^3-27x+k=0$ has atleast two distinct integer roots is

(A)$1$ (B)$2$ (C)$3 $ (D)$4$

My Attempt: The condition for cubic $x^3+ax+b=0$to have $3$ real roots happens to be $4a^3+27b^2\leq0$. But how to go about finding condition for integer roots.

  • $\begingroup$ math.stackexchange.com/questions/2157643/… $\endgroup$ Commented Apr 1, 2019 at 3:41
  • $\begingroup$ I did apply the Cardano's method. The only way to do is i suppose by taking $x=-3,-2,-1,0,1,2,3$ and check whether we get another integer root and at that root k should be an integer. $\endgroup$
    – Maverick
    Commented Apr 1, 2019 at 3:51
  • $\begingroup$ May be you can use rational root theorem $\endgroup$
    – ersh
    Commented Apr 1, 2019 at 4:45
  • 1
    $\begingroup$ The condition that k is an integer does not worth mentioning it follows from vieta relations. $\endgroup$ Commented Apr 1, 2019 at 5:36

3 Answers 3


Suppose $x^3 - 27x + k = 0$ has distinct integer roots $a$ and $b$; then $$ a^3 - 27a = b^3 - 27b, $$ or $$ a^3 - b^3 = 27(a - b). $$ Since, by hypothesis, $a\ne b$, a factor of $a-b$ can be removed, resulting in $$ a^2 + ab + b^2 = 27. $$ After multiplying by $4$, this can be rearranged into $$ (2a + b)^2 + 3b^2 = 108. $$ It follows that the integer $2a+b$ is a multiple of $3$, and has a square $\le 108$; thus $2a+b = 0,\pm3,\pm6$ or $\pm9$.

  • If $2a+b = 0$, then $b^2 = 36$, so $b = \pm6$.
  • If $2a+b = \pm3$, then $b^2 = 33$, so this has no integral solution.
  • If $2a+b = \pm6$, then $b^2 = 24$, so this has no integral solution.
  • If $2a+b = \pm9$, then $b^2 = 9$, so $b = \pm3$.

In the first case, we find $(a,b) = (-3,6)$ or $(3,-6)$. In the fourth case, the four possible combinations of signs result in $(a,b) = (3,3), (6,-3), (-3,-3)$ or $(-6,3)$. Rejecting the cases with $a=b$, $(a,b) = (-3,6)$ or $(6,-3)$ results in $k = 27a - a^3 = -54$ and $(a,b) = (3,-6)$ or $(-6,3)$ results in $k = 54$. Thus there are two possible values of $k$.


If $x=b$ is one of the solutions


Now if $b$ is a repeated root and $c$ is the third one,

$0=b+b+c\iff c=-2b$

$$\implies x^3-27x+k=(x-b)^2(x+2b)=x^3+x(2b+b^2)-2b^3$$

$\implies b^2+2b=-27\iff b^2+2b+27=0$ which does not have an integer solution.

So, we can not have repeated roots.

The rest two solutions will be available from the quadratic equation $$0=\dfrac{x^3-27x-(b^3-27b)}{x-b}=x^2+bx+b^2-27$$

As $x$ is an integer, the he discriminant must be perfect square i.e.,


$\implies36-b^2\ge0\iff b^2\le36\implies b\le6$

Also $3$ must divide $b$ to keep $D$ perfect square

So, $b\in[0,\pm3,\pm6]$

Clearly, $D$ is perfect square only for $b=\pm6$ .


Here is another solution mainly from vieta relations:-

Say the roots be $ \large p,q,r$ all are integers since there sum is zero two integer implies the third one to be so

Now $$pqr=k \\ pq+qr+rp=-27 \\ p+q+r=0 $$ $$\implies pq(p+q)=k \\ and \\ pq-(p+q)^2=-27 \\ \implies p^2+q^2+pq=27 \\ p=\frac{-q+\sqrt{3(36-q^2)}}{2}\\or,\\p=\frac{-q-\sqrt{3(36-q^2)}}{2}$$ arriving at this the number of integral solution is not very difficult to count first of all we conclude $\large q$ is even and others such conclusion reduces the cases and the solution follows.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .