Example 11 Solve the equation
$$
2\left(x+\sqrt{x^{2}-1}\right)=(x-1+\sqrt{x+1})^{2} \text {. }
$$
(1987, Junior High School Mathematics Correspondence Competition in Some Provinces and Cities)
Solution: From the original equation, we know $x \geqslant 1$, so the original equation can be rewritten as
$$
\begin{array}{l}
(x+1)+2 \sqrt{x+1} \cdot \sqrt{x-1}+(x-1) \\
=(x-1+\sqrt{x+1})^{2} .
\end{array}
$$

Let $\sqrt{x+1}=m, \sqrt{x-1}=n(m>0$, $n \geqslant 0$ ), then the original equation can be transformed into
$$
\begin{array}{l}
m^{2}+2 m n+n^{2}=\left(n^{2}+m\right)^{2}, \\
(m+n)^{2}=\left(n^{2}+m\right)^{2} .
\end{array}
$$

Since $m+n>0, m+n^{2}>0$, we have
$$
\begin{array}{l}
m+n=n^{2}+m . \\
\therefore \quad n=0 \text { or } n=1,
\end{array}
$$

i.e., $\sqrt{x-1}=0$ or $\sqrt{x-1}=1$.
$\therefore \quad x=1$ or $x=2$.
Upon verification, $x=1$ and $x=2$ are both roots of the original equation.
(2) Partial substitution. Usually, we replace all the original unknowns with new ones, but sometimes we can also replace only part of them.