Example 3. Simplify: $\sqrt{(a-5)^{2}}$
$$
\begin{array}{l}
\sqrt{(a-5)^{2}}=|a-5| \\
=\left(\begin{array}{ll}
a-5 ; & \text { (when } a-5>0, \text { i.e., } a>5 \text { ) } \\
03 & \text { (when } a-5=0, \text { i.e., } a=5 \text { ) } \\
5-a, & \text { (when } a-5<0, \text { i.e., } a<5 \text { ) }
\end{array}\right.
\end{array}
$$