## Task 1.

Determine all functions $f: \mathbb{R}^{+} \rightarrow \mathbb{R}$ such that

$$
\left(x+\frac{1}{x}\right) f(y)=f(x y)+f\left(\frac{y}{x}\right), \quad \text { for all } x, y \in \mathbb{R}^{+}
$$

$\left(\mathbb{R}^{+}\right.$ is the notation for the set of all positive real numbers.)
## Solution.

Let $g$ be one solution. Then $f(x)=g(x)+K x+\frac{L}{x}$ is also a solution. Let $0<a \neq 1$. Choose $K$ and $L$ such that $f(1)=0, f(a)=0$. They definitely exist and are obtained by solving a system of two equations with two unknowns.

Substitute $x=y=a$, we get $f\left(a^{2}\right)=0$. Then substitute $x=a, y=a^{2}$, we get $f\left(a^{3}\right)=0$. Inductively, by substituting $x=a, y=a^{n-1}$, we obtain $f\left(a^{n}\right)=0$. Therefore, $f\left(a^{k}\right)=0$ for all $k \in \mathbb{N}$.

Substitute $y=1, x=a^{k}$, using the previous result, we get $f\left(a^{-k}\right)=0$, so we have $f\left(a^{k}\right)=0$ for all $k \in \mathbb{Z}$.

Substitute into the original equation $y=a^{k} x$, we get $\left(x+\frac{1}{x}\right) f\left(a^{k} x\right)=f\left(a^{k} x^{2}\right)$.

Substitute into the original equation $x:=a^{k} x, y=x$, we get $\left(a^{k} x+\frac{1}{a^{k} x}\right) f(x)=f\left(a^{k} x^{2}\right)$.

In (1), substitute $x:=a x$ and we get $\left(a x+\frac{1}{a x}\right) f\left(a^{k+1} x\right)=f\left(a^{k+2} x^{2}\right)$.

In (2), substitute $k:=k+2$ and we get $\left(a^{k+2} x+\frac{1}{a^{k+2} x}\right) f(x)=f\left(a^{k+2} x^{2}\right)$.

By equating (1) and (2) (assuming $f(x) \neq 0$):

$$
\frac{f\left(a^{k} x\right)}{f(x)}=\frac{a^{k} x+a^{-k} x^{-1}}{x+x^{-1}}
$$

By equating (3) and (4) (assuming $f(x) \neq 0$):

$$
\frac{f\left(a^{k+1} x\right)}{f(x)}=\frac{a^{k+2} k x+a^{-k-2} x^{-1}}{a x+a^{-1} x^{-1}}
$$

Now in (5), substitute $k:=k+1$ and equate (5) and (6) and simplify:

$$
a^{k+2}+\frac{1}{a^{k+2}}=a^{k}+\frac{1}{a^{k}}
$$

Further simplifying this expression, we get for all $k \in \mathbb{N}$:

$$
a^{2 k+2}\left(a^{2}-1\right)=\left(a^{2}-1\right)
$$

from which $a= \pm 1$, which is impossible. Therefore, $f(x)=0$. Thus, our solution $g$ is of the form $g(x)=K x+\frac{L}{x}$, and verification shows that all such functions satisfy the equation.