1. If $x, y$ are natural numbers for which $x-y-\frac{1}{x}+\frac{1}{y}=0$, calculate the value of the expression $\left(\frac{x}{y}\right)^{2018}+\left(\frac{y}{x}\right)^{2018}$.
Solution. First method. If we multiply the given equation by xy, we get $x^{2} y+x=x y^{2}+y$, i.e., $x(x y+1)=y(x y+1)$. Since the numbers are natural, it follows that $x y+1 \neq 0$. Therefore, $x=y$. According to this, $\left(\frac{x}{y}\right)^{2018}+\left(\frac{y}{x}\right)^{2018}=2$.

Second method. The equation is equivalent to the equation $x+\frac{1}{y}=y+\frac{1}{x}$, i.e., to the equation $\frac{x y+1}{y}=\frac{x y+1}{x}$. The numbers are natural, so it follows that $x y+1 \neq 0$. Therefore, $\frac{1}{y}=\frac{1}{x}$, which means $x=y$, so $\left(\frac{x}{y}\right)^{2018}+\left(\frac{y}{x}\right)^{2018}=2$.

Third method. The given equation is equivalent to the equation $(x-y)+\frac{x-y}{x y}=0$, i.e., to $(x-y) \frac{x y+1}{x y}=0$. The numbers are natural, so $x y+1 \neq 0$. Therefore, $x=y$. According to this, $\left(\frac{x}{y}\right)^{2018}+\left(\frac{y}{x}\right)^{2018}=2$.