19. Find all functions $f: \mathbf{R} \backslash\{0\} \rightarrow \mathbf{R}$, such that for all $x, y \in \mathbf{R} \backslash\{0\}$, we have
$$
x f\left(x+\frac{1}{y}\right)+y f(y)+\frac{y}{x}=y f\left(y+\frac{1}{x}\right)+x f(x)+\frac{x}{y} \text {. }
$$
(19th Iranian Mathematical Olympiad (Second Round))
Let $g(x)=f(x)-x$, then the original functional equation becomes
$$
x g\left(x+\frac{1}{y}\right)+y g(y)=y g\left(y+\frac{1}{x}\right)+x g(x) \text {. }
$$

Let $y=1$, we get
$$
x g(x+1)+g(1)=g\left(1+\frac{1}{x}\right)+x g(x) \text {. }
$$

Substitute $x$ with $\frac{1}{x}$, we have
$$
\frac{1}{x} g\left(1+\frac{1}{x}\right)+g(1)=g(x+1)+\frac{1}{x} g\left(\frac{1}{x}\right) \text {. }
$$

Thus, $g\left(1+\frac{1}{x}\right)=x g(x+1)+g\left(\frac{1}{x}\right)-x g(1)$.
Eliminating $g\left(1+\frac{1}{x}\right)$, we get
$$
x g(x)+g\left(\frac{1}{x}\right)=(x+1) g(1) \text {. }
$$

Similarly, let $y=-1$, we get
$$
x g(x)-g\left(\frac{1}{x}\right)=g(-1)(x-1) \text {. }
$$

Therefore, we have
$$
2 x g(x)=[g(1)+g(-1)] x+[g(1)-g(-1)] \text {. }
$$

Then $f(x)=A+\frac{B}{x}+x$, where $A$ and $B$ are arbitrary constants.
Upon verification, $f(x)$ satisfies the original functional equation.