Discriminant of the depressed cubic
Solution 1:
Any $y^3 + py + q$ can be written as $F := (y-x_1)(y-x_2)(y+x_1 + x_2)$ for some $x_1,x_2$ in an algebraic extension. So it suffices to prove the formula just for this one polynomial $F$. Compute the discriminant of $F$ directly from the definition, compute the $x^1$ and $x^0$ coefficients in $F$ (i.e. $p$ and $q$) in terms of $x_1,x_2$, then compute $-4p^3-27q^2$ and compare.
Solution 2:
The discriminant is a quantity such that its sign decides the number of real roots. When it is zero, we have two roots, of which a double one. This double root corresponds to an extremum which is on the horizontal axis (blue curve).
By canceling the derivative
$$3y^2+p=0,$$
we solve for $y$,
$$y=\pm\sqrt{-\frac p3}.$$
Then plugging in the cubic function,
$$f(y)=\mp\frac p3\sqrt{-\frac p3}\pm p\sqrt{-\frac p3}+q=\pm\frac{2p}3\sqrt{-\frac p3}+q=0.$$
This quantity cancels when
$$4p^3+27q^2=0.$$
Just for fun, we can use the method for the quadratic equation. With a deflated equation
$$y^2+p=0$$ we trivially have $$y=0,\\f(0)=p=0.$$
[The deflated equation is obtained by completing the square, $ax^2+bx+c=a\left(\left(x-\frac b{2a}\right)^2+\frac{4ac-b^2}{4a^2}\right)$.]
Solution 3:
@Mark There is a nice graphical interpretation of the discriminant. Let us consider
$$x^3+px+q=0$$
as the equation giving the abscissas of intersection point(s) of
$$\begin{cases}y=x^3 \ \ & \text{cubic curve (C)}\\y=-px-q \ \ & \text{straight line } \ (D_{p,q})\end{cases}$$
(see graphics below) According to the values of $p$ and $q$, $(C) \cap (D_{p,q})$ have one, two or three intersection points (which correspond to one, two or three real roots).
For example the green line has one intersection point with (C), whereas the blue line has three. The transition case between 1 root ans three roots is when there is a double root; this means exactly for $(D_{p,q})$ that it must be tangent to $(C)$, as are all the black lines represented on the figure below.
Writing the general equation of the tangent to (C) under the form:
$$y=x_0^3+3x_0^2(x-x_0) \ \ \iff \ \ y=(3x_0^2)x+(-2x_0^3)$$
By identification with the generic equation $y=-px-q$ of $(D_{p,q})$, we obtain
$$\begin{cases}\ \ \ 3x_0^2&=&-p\\-2x_0^3&=&-q\end{cases}$$
Eliminating $x_0$ between these two equations give the equation $4p^3+27q^2=0$, which is a condition of transition between the case "one real solution" and 3 "real solutions" (with a complete analogy with the rôle of condition $\Delta=0$ for a quadratic).
Solution 4:
Let $(y-a)(y-b)(y-c)=0$ our equation,
$a+b+c=3u$, $ab+ac+bc=3v^2$, where $v^2$ can be negative, and $abc=w^3$.
Thus, we have $y^3-3uy^2+3v^2y-w^3=0$.
In our case $v^2=\frac{p}{3}$, $u=0$ and $w^3=-q$.
Hence, the discriminant it's $$(a-b)^2(a-c)^2(b-c)^2$$ or $$27(3u^2v^4-4v^6-4u^3w^3+6uv^2w^3-w^6)$$ or $$27\left(-4\cdot\frac{p^3}{27}-q^2\right)$$ or $$-4p^3-27q^2$$