Example 15 Solve the equation $\sqrt{\frac{3-x}{1+x}}=\frac{3-x^{2}}{x^{2}+1}$.
Let $\sqrt{\frac{3-x}{1+x}}=\frac{3-x^{2}}{x^{2}+1}=k$, then
$$
\begin{array}{l}
k^{2} x+x+k^{2}-3=0, \\
(1+k) x^{2}+k-3=0 .
\end{array}
$$
(2) $\cdot k-$ (1) $\cdot x$ gives $k^{2}-x^{2}-k^{2} x+k x^{2}-3 k+3 x=0$.

Thus $(k-x) \cdot(k-k x+x-3)=0$, yielding $k=x$ or $k=\frac{3-x}{1-x}$.
Substituting $k=x$ and $k=\frac{3-x}{1-x}$ into the original equation, we get
$$
x_{1}=1, x_{2}=0, x_{3}=1+\sqrt{2}, x_{4}=1-\sqrt{2}, x_{5}=3 \text {. }
$$

Upon verification, $x=1$ and $x=1-\sqrt{2}$ are the roots of the original equation.