Example 2 Let $F(x)$ be a real-valued function defined for all real numbers except $x=0$ and $x=1$, and $F(x)+F\left(\frac{x-1}{x}\right)=1+x$, find $F(x)$.
Let $x=\frac{y-1}{y}(y \neq 0, y \neq 1)$ be substituted into the original function equation,  
we get $F\left(\frac{y-1}{y}\right)+F\left(\frac{1}{1-y}\right)=\frac{2 y-1}{y}$,  
Let $x=\frac{1}{1-z}(z \neq 0, z \neq 1)$ be substituted into the original function equation, we get
$$
F\left(\frac{1}{1-z}\right)+F(z)=\frac{2-z}{1-z} \text {, }
$$

Substituting $y 、 z$ with $x$ in (1) and (2), we get
$$
\left\{\begin{array}{l}
F(x)+F\left(\frac{x-1}{x}\right)=1+x, \\
F\left(\frac{x-1}{x}\right)+F\left(\frac{1}{1-x}\right)=\frac{2 x-1}{x}, \\
F\left(\frac{1}{1-x}\right)+F(x)=\frac{2-x}{1-x},
\end{array}\right.
$$

Eliminating $F\left(\frac{x-1}{x}\right) 、 F\left(\frac{1}{1-x}\right)$, we get
$$
F(x)=\frac{1+x^{2}-x^{3}}{2 x(1-x)} \text {. }
$$

Upon verification, the above $F(x)$ satisfies the conditions.