[step:Determine the sign set when the cubic has three ordered real roots]Assume that $f$ has three real roots $r_1,r_2,r_3 \in \mathbb{R}$ with
\begin{align*}
r_1 < r_2 < r_3.
\end{align*}
Because $f$ is monic and has these three roots, its factorization over $\mathbb{R}$ is
\begin{align*}
f(x) = (x-r_1)(x-r_2)(x-r_3)
\end{align*}
for every $x \in \mathbb{R}$.
The ordered roots divide $\mathbb{R}$ into the four intervals $(-\infty,r_1)$, $(r_1,r_2)$, $(r_2,r_3)$, and $(r_3,\infty)$. On these intervals, the signs of the factors are as follows:
If $x<r_1$, then $(x-r_1)<0$, $(x-r_2)<0$, and $(x-r_3)<0$. If $r_1<x<r_2$, then $(x-r_1)>0$, $(x-r_2)<0$, and $(x-r_3)<0$. If $r_2<x<r_3$, then $(x-r_1)>0$, $(x-r_2)>0$, and $(x-r_3)<0$. If $r_3<x$, then $(x-r_1)>0$, $(x-r_2)>0$, and $(x-r_3)>0$. Multiplying the three signs gives
Thus $f(x)<0$ on $(-\infty,r_1)$, $f(x)>0$ on $(r_1,r_2)$, $f(x)<0$ on $(r_2,r_3)$, and $f(x)>0$ on $(r_3,\infty)$. At each root $r_i$, the factorization gives $f(r_i)=0$. Therefore
\begin{align*}
S = \{x \in \mathbb{R} : f(x) \geq 0\}
=
[r_1,r_2] \cup [r_3,\infty).
\end{align*}[/step]