TITLE: Determine the values of $k$ for which the equation $x^3-12x+k = 0$ will have three different roots.
QUESTION [5 upvotes]: Determine the values of $k$ for which the equation $x^3-12x+k = 0$ will have three different roots.
I can do this with calculus, I was just wondering what could be the pure algebraic approach to solve this?

REPLY [2 votes]: We interpret "algebraic" somewhat loosely, in order to describe some material that was once a part of school algebra, but no longer is.
Look somewhat more generally at $x^3-ax+k=0$. Recall the identity
$$\cos 3\theta=4\cos^3 \theta-3\cos\theta.$$
We want to make our cubic look like $4t^3-3t=c$.
Do this by making the change of variable $x=\lambda t$.  Then our equation becomes 
$$\lambda^3 t^3-a\lambda t +k=0.$$
We want to have $\dfrac{\lambda^3}{a\lambda}=\dfrac{4}{3}$. Solve for $\lambda$. We get $\lambda=\sqrt{4a/3}$.
For simplicity we now go back to our specific numbers, though the argument can be made quite general. With $a=12$, we can take $\lambda=4$.
Substitute in our equation. After a bit of manipulation, it becomes
$$4t^3-3t=-\frac{k}{16}.\qquad\qquad(\ast)$$
By comparison with the identity for $\cos 3\theta$, $(\ast)$ has three (not necessarily distinct) solutions iff $-k/16$ is the cosine of something (which we call $3\theta$). So the necessary and sufficient condition for $3$ not necessarily distinct real roots is  $|-k/16|\le 1$. Let $3\theta=\arccos(-k/16)$. Then the solutions of $(\ast)$ are $\cos(\theta)$, $\cos(\theta+2\pi/3)$, and $\cos(\theta+4\pi/3)$.  For some special values of $\theta$, two or more roots coincide. 
More general cubics can be handled in the same way. If for example we are interested in $x^3+px^2+qx+r=0$, first make the substitution $x=y-p/3$. The resulting polynomial has no $y^2$ term.
The substitution  trick $x=y-p/3$ goes back to Cardano. The trigonometric solution of the cubic in the case of all real roots is due to Vieta.