Example 1 Solve the functional equation $f(x)+f\left(\frac{x-1}{x}\right)=1+x \quad (x \neq 0,1)$
Let $y=\frac{x-1}{x}$, then $\frac{y-1}{y}=\frac{1}{1-x}$. Substituting into (1), we get $f\left(\frac{x-1}{x}\right)+f\left(\frac{1}{1-x}\right)=1+\frac{x-1}{x}$
Let $y=\frac{1}{1-x}$, then $\frac{y-1}{y}=x$. Substituting into (1), we have $f\left(\frac{1}{1-x}\right)+f(x)=1+\frac{1}{1-x}$
(1) + (3) - (2).
$f(x)=\frac{1+x^{2}-x^{3}}{2 x(1-x)}$, which, upon verification, is a solution to (1).