Example 12 (1998 Canadian Mathematical Olympiad) Find all real numbers $x$ such that
$$
x=\sqrt{x-\frac{1}{x}}+\sqrt{1-\frac{1}{x}}.
$$
Solution: Clearly $x>0$, the original equation can be transformed into $\frac{1}{\sqrt{x}} \cdot \sqrt{1-\frac{1}{x^{2}}}+\sqrt{1-\frac{1}{x}} \cdot \frac{1}{x}=1$.
Construct vectors $\vec{a}=\left(\frac{1}{\sqrt{x}}, \sqrt{1-\frac{1}{x}}\right), \vec{b}=\left(\sqrt{1-\frac{1}{x^{2}}}, \frac{1}{x}\right)$.
By $\vec{a} \cdot \vec{b} \leqslant|\vec{a}||\vec{b}|$, we get
$1=\frac{1}{\sqrt{x}} \cdot \sqrt{1-\frac{1}{x^{2}}}+\sqrt{1-\frac{1}{x}} \cdot \frac{1}{x} \leqslant \sqrt{\frac{1}{x}+1-\frac{1}{x}} \cdot \sqrt{1-\frac{1}{x^{2}}+\frac{1}{x^{2}}}=1$.
Therefore, the above inequality holds with equality, so $\vec{a}$ and $\vec{b}$ are collinear and in the same direction. Noting that $|\vec{a}|=|\vec{b}|=1$, hence $\vec{a}=\vec{b}$. Thus $\frac{1}{\sqrt{x}}=\sqrt{1-\frac{1}{x^{2}}}$ and $\sqrt{1-\frac{1}{x}}=\frac{1}{x}$, solving gives $x=\frac{1+\sqrt{5}}{2}$.
Upon verification, the solution to the original equation is $x=\frac{1+\sqrt{5}}{2}$.