Example 22. Solve the equation

$$
\frac{\sqrt{2-x}}{\sqrt{2+x}}=\frac{2-x}{2+x}
$$
Solution. Solving the system of inequalities

$$
\left\{\begin{array}{l}
2-x \geqslant 0 \\
x+2>0
\end{array}\right.
$$

we find the domain of the given equation - the interval $-2<x \leqslant 2$.

Letting $t=\frac{\sqrt{2-x}}{\sqrt{2+x}}$, we get $t^{2}=\frac{2-x}{2+x}$; therefore, the given equation can be written as

$$
t=t^{2}
$$

The roots of this equation are $t_{1}=0$ and $t_{2}=1$. Consequently, the system of equations

$$
\frac{\sqrt{2-x}}{\sqrt{2+x}}=0, \quad \frac{\sqrt{2-x}}{\sqrt{2+x}}=1
$$

i.e., the system

$$
\sqrt{2-x}=0, \quad \sqrt{2-x}=\sqrt{2+x}
$$

is a consequence of the given equation. Solving this system, we find its roots: $x_{1}=2$ and $x_{2}=0$.

Both roots belong to the interval $-2<x \leqslant 2$; by substituting the numbers 0 and 2 into the original equation, we verify that they are its roots.

Thus, the set of all solutions to the original equation consists of two numbers: $x_{1}=2$ and $x_{2}=0$.

Some transformations lead to the domain of the obtained equation not containing some part of the domain of the original equation and at the same time having a part not contained in the domain of the original equation. By making such transformations, one can obtain an equation among whose roots some roots of the original equation are missing, and at the same time, among the roots of the obtained equation, there are extraneous roots.

For example, if we consider the equation

$$
\frac{\sqrt{2+x}+\sqrt{2-x}}{\sqrt{2+x}-\sqrt{2-x}}=\frac{2}{x}
$$

as a proportion and, using the property of proportion $\frac{a}{b}=\frac{c}{d} \Rightarrow$ $\Rightarrow \frac{a-b}{b+a}=\frac{c-d}{d+c}$, replace it with the equation

$$
\frac{\sqrt{2-x}}{\sqrt{2+x}}=\frac{2-x}{2+x}
$$

then out of the two roots $x_{1}=2$ and $x_{2}=0$ of equation (8) (see example 22), the root $x_{1}=0$ is extraneous for equation (7) (see example 20), and the root $x_{3}=-2$ of equation (7) is not among the roots of equation (8).

To avoid losing roots and the appearance of extraneous roots, it is advisable to solve the equation by the method of equivalent transformations, i.e., solve the equation only on its domain, replacing the equation with an equivalent one. If the desired transformation of the equation or its terms cannot be made on the entire domain, then the domain of the equation should be divided into parts and the equation should be solved on each of these parts. Then, by combining the sets of solutions of the equation on all parts of its domain, we obtain the set of all solutions of the equation.

For example, let's solve equation (7) by the method of equivalent transformations (considering equation (7) as a proportion and transitioning to equation (8), which is its derived proportion).

The domain of equation (7) is the set of all $x$ from two intervals: $-2 \leqslant x<0$ and $0<x \leqslant 2$. By direct substitution of $x_{1}=-2$ and $x_{2}=2$, which belong to the domain of equation (7), we verify that these numbers are its roots. On the remaining part of the domain, i.e., on the intervals $-2<x<0$ and $0<x<2$, equation (7) is equivalent to equation (8).

The solutions $x_{3}=0$ and $x_{4}=2$ of equation (8) do not belong to either of the intervals $-2<x<0$ and $0<x<2$; therefore, on the considered part of the domain, equation (7) has no solutions. Thus, the set of all solutions to equation (7) consists of two numbers: $x_{1}=-2$ and $x_{2}=2$.