Example 9. Solve the equation

$$
\sqrt{(x-1)^{2}(x-4)}=|x-1| \sqrt{16-x^{2}} .
$$
Solution. Solving the system of inequalities

$$
\left\{\begin{array}{l}
(x-1)^{2}(x-4) \geqslant 0 \\
16-x^{2} \geqslant 0
\end{array}\right.
$$

we find the domain of the equation: $x_{1}=1, x_{2}=4$. By verification, we establish that each of them is a root of equation (3).

Thus, the set of all roots of equation (3) consists of two numbers: $x_{1}=1$ and $x_{2}=4$.