Example 2. Solve the inequality

$$
\lg \left(x^{2}-2 x-3\right) \geqslant 0
$$
Solution. The base of the logarithm is greater than one; therefore, the given inequality is equivalent to the inequality

$$
\begin{aligned}
x^{2}-2 x-3 \geqslant 1 \Leftrightarrow x^{2}-2 x-4 & \geqslant 0 \Leftrightarrow \\
& \Leftrightarrow(x-(1-\sqrt{5}))(x-(1+\sqrt{5})) \geqslant 0
\end{aligned}
$$

from which it follows that the intervals $-\infty<x \leqslant 1-\sqrt{5}$ and $1+\sqrt{5} \leqslant$ $\leqslant x<+\infty$ constitute the set of all solutions to the original inequality.