2. The function $f$ satisfies the equation $(x-1) f(x)+f\left(\frac{1}{x}\right)=\frac{1}{x-1}$ for each value of $x$, not equal to 0 and 1. Find $f\left(\frac{2018}{2019}\right)$.

(7 points).
Answer: 2019.

## Solution:

Substitute $\frac{1}{x}$ for $x$ in the original equation. Together with the original equation, we get a system of linear equations in terms of $f(x)$ and $f\left(\frac{1}{x}\right)$.

$$
\left\{\begin{array}{l}
(x-1) f(x)+f\left(\frac{1}{x}\right)=\frac{1}{x-1} \\
\left(\frac{1}{x}-1\right) f\left(\frac{1}{x}\right)+f(x)=\frac{x}{x-1}
\end{array}\right.
$$

Solving the obtained system, we find $f(x)=\frac{1}{1-x}$. Therefore, $f\left(\frac{2018}{2019}\right)=\frac{1}{1-\frac{2018}{2019}}=2019$.