
Problem 2. Find all functions $f:(0, \infty) \rightarrow(0, \infty)$ such that

$$
f\left(f(x)+\frac{y+1}{f(y)}\right)=\frac{1}{f(y)}+x+1
$$

for all $x, y>0$.

(Dominik Burek)


Solution. First, observe that the range of $f$ contains the interval $(A, \infty)$ where $A=\frac{1}{f(1)}+1$. Indeed, for any $B>A$ we let $x=B-A>0$ and $y=1$ and we obtain

$$
f\left(f(x)+\frac{y+1}{f(y)}\right)=\frac{1}{f(y)}+x+1=B \text {. }
$$

Second, $f$ is injective. Indeed, if $f\left(x_{1}\right)=f\left(x_{2}\right)$ then

$$
\frac{1}{f(y)}+x_{1}+1=f\left(f\left(x_{1}\right)+\frac{y+1}{f(y)}\right)=f\left(f\left(x_{2}\right)+\frac{y+1}{f(y)}\right)=\frac{1}{f(y)}+x_{2}+1
$$

which yields $x_{1}=x_{2}$.

Now, consider an arbitrary $0B>A$. Then $B=f\left(y_{1}\right)$ and $C=f\left(y_{2}\right)$ for some $y_{1}, y_{2}>0$. Let $x>0$ be arbitrary and set $x_{1}=x, x_{2}=x+\delta$. We have

$$
\frac{1}{f\left(y_{1}\right)}+x_{1}+1=\frac{1}{f\left(y_{2}\right)}+x_{2}+1
$$

hence

and, by injectivity,

$$
f\left(f\left(x_{1}\right)+\frac{y_{1}+1}{f\left(y_{1}\right)}\right)=f\left(f\left(x_{2}\right)+\frac{y_{2}+1}{f\left(y_{2}\right)}\right)
$$

$$
f\left(x_{1}\right)+\frac{y_{1}+1}{f\left(y_{1}\right)}=f\left(x_{2}\right)+\frac{y_{2}+1}{f\left(y_{2}\right)} .
$$

This rewrites as $f(x+\delta)=f(x)+\varepsilon_{\delta}$ where $\varepsilon_{\delta}=\frac{y_{1}+1}{f\left(y_{1}\right)}-\frac{y_{2}+1}{f\left(y_{2}\right)}$ depends only on $\delta$. Easy induction yields $f(x+n \delta)=f(x)+n \varepsilon_{\delta}$ for every integer $n$ satisfying $x+n \delta>0$.

We prove now that $f$ is linear on $\mathbb{Q} \cap(0, \infty)$. For every integer $k>A$ we have $f(2)=f\left(1+k \cdot \frac{1}{k}\right)=f(1)+k \varepsilon_{1 / k}$, hence $\varepsilon_{1 / k}=\frac{f(2)-f(1)}{k}$. Let $x$ be a positive rational. Write $x=\frac{m}{n}$ for some integers $m, n$ such that $n>A$. Then

$$
\begin{aligned}
f(x) & =f\left(1+\frac{m-n}{n}\right)=f(1)+(m-n) \varepsilon_{1 / n}=f(1)+\frac{(m-n)(f(2)-f(1))}{n} \\
& =f(1)+(x-1)(f(2)-f(1)) .
\end{aligned}
$$

We prove now that $f$ is increasing. Suppose otherwise: $f(x)>f(y)$ for some $0<x<y$. Let $\delta=\frac{y-x}{k}$ where $k$ is an integer so large that $\delta<\frac{1}{A}$. Then $f(y)=f(x+k \delta)=f(x)+k \varepsilon_{\delta}$, hence $\varepsilon_{\delta}=\frac{f(y)-f(x)}{k}<0$. Then $f(x+n \delta)=$ $f(x)-n \varepsilon_{\delta}<0$ for sufficiently large $n$ which contradicts the assumption that the codomain of $f$ is $(0, \infty)$.

Since $f$ is linear on $\mathbb{Q} \cap(0, \infty)$ and increasing on $(0, \infty), f$ is linear on $(0, \infty)$. Letting $f(x)=a x+b$ we obtain

$$
a\left(a x+b+\frac{y+1}{a y+b}\right)+b=\frac{1}{a y+b}+x+1,
$$

which immediately gives $a=1$ and $b=0$. The function $f(x)=x$ clearly works.
