Example 1 Let the function $f:\{x \mid x \neq 0,1, x \in R\} \rightarrow$ $R$, and satisfies $f(x)+f\left(\frac{x-1}{x}\right)=1+x$. Find $f(x)$.
Solution: Let $\frac{x-1}{x}=y$, then $x=\frac{1}{1-y}$. Substituting into (1), we get $f\left(\frac{1}{1-y}\right)+f(y)=\frac{y-2}{y-1}$,
i.e., $f(x)+f\left(\frac{1}{1-x}\right)=\frac{x-2}{x-1}$. Let $x=\frac{u-1}{u}$. Substituting into (1), we get $f\left(\frac{u-1}{u}\right)+f\left(\frac{1}{1-u}\right)=\frac{2 u-1}{u}$, i.e., $f\left(\frac{x-1}{x}\right)+f\left(\frac{1}{1-x}\right)=\frac{2 x-1}{x}$. By (1) + (2) - (3), we get $f(x)=\frac{x^{3}-x^{2}-1}{x(x-1)}$.
Verify that $f(x)=\frac{x^{3}-x^{2}-1}{x(x-1)}$ satisfies the equation as required.
(2) Step-by-step method
First, find the solution to the functional equation for $x \in N$, then sequentially find the solutions for $x \in Z, x \in Q, x \in R$.