2. Let the function $f(x)$ be a function from $\mathbf{R} \rightarrow \mathbf{R}$, satisfying for all $x \in \mathbf{R}$, $f(x)+x f(2-x)=2$, then the analytical expression of $f(x)$ is $f(x)=$ $\qquad$ .
答 $\left\{\begin{array}{ll}\frac{2}{1-x} & x \neq 1 \\ 1 & x=1\end{array}\right.$.
解折 Substitute $2-x$ into $f(x)+x f(2-x)=2$, we get $f(2-x)+(2-x) f(x)=2$. By treating $f(x)$ and $f(2-x)$ as two unknowns, we can solve to get $f(x)=\frac{2}{1-x}(x \neq 1)$, when $x=1$, $f(x)=1$.