Example 18. Solve the equation

$$
\log _{2} x^{2}=2
$$
Solution.

The first method. The domain of the equation is any $x \neq 0$. Applying the formula $\log _{2} x^{2}=2 \log _{2} x(x>0)$, we get the equation $2 \log _{2} x=2$, from which we find $x=2$.

The transformation performed allowed solving the equation (6) only on a part of its domain, specifically for positive $x$, where the formula $\log _{2} x^{2}=2 \log _{2} x$ is valid. On the set $x<0$ and

$$
\log _{2} x^{2}=\log _{2}(-x)^{2}=2 \log _{2}(-x)
$$

then for $x<0$ we have

$$
\log _{2} x^{2}=\left\{\begin{array}{ll}
2 \log _{2} x, & x>0 \\
2 \log _{2}(-x), & x<0
\end{array}\right.
$$

Moreover, $2=\log _{2} 4$.

Therefore,

(6) $\Leftrightarrow \log _{2} x^{2}=\log _{2} 4 \Leftrightarrow x^{2}=4 \Leftrightarrow(x-2)(x+2)=0 \Leftrightarrow\left[\begin{array}{l}x=2, \\ x=-2 .\end{array}\right.$

Thus, the solutions to the original equation are $x_{1}=2$ and $x_{2}=-2$.