Example 7 Solve the equation $\sqrt{x-\frac{1}{x}}+\sqrt{\frac{x-1}{x}}=x$.
Analysis: The general method is to eliminate the square roots by squaring both sides twice, which is quite cumbersome. Observing that $x>1$. Construct two sets of numbers $\sqrt{x-\frac{1}{x}}$, $\frac{1}{\sqrt{x}} ; 1, \sqrt{x-1}$, by the Cauchy-Schwarz inequality, $\left(\sqrt{x-\frac{1}{x}}+\right.$ $\left.\sqrt{\frac{x-1}{x}}\right)^{2} \leqslant\left(x-\frac{1}{x}+\frac{1}{x}\right)(1+x-1)=x^{2}$, and $\sqrt{x-\frac{1}{x}}+\sqrt{\frac{x-1}{x}}=x, \therefore x^{2} \leqslant x^{2}$, only when $x^{2}=x^{2}$, equality holds if and only if $\sqrt{x-\frac{1}{x}}=\frac{1}{\sqrt{x} \sqrt{x-1}}$, simplifying gives $x\left(x^{2}-x-1\right)=0$, solving yields $x=\frac{1 \pm \sqrt{5}}{2}$ (since $x>0$ discard $\left.\frac{1-\sqrt{5}}{2}\right), \therefore x=\frac{1+\sqrt{5}}{2}$.