parmenides51 wrote:
Let $Q^+$ denote the set of positive rationals. Determine all functions $f : Q^+ \to Q^+$ that satisfy both of these conditions:
(i) $f(x)$ is an integer if and only if $x$ is an integer;
(ii) $f(f(xf(y)) + x) = yf(x) + x$ for all $x, y \in Q^+$.
No need for first condition.
Let $P(x,y)$ be the assertion $f(f(xf(y))+x)=yf(x)+x$
$P(\frac x2,\frac x{2f(\frac x2)})$ $\implies$ $f(x)$ is surjective
Let then $x,\Delta>0$ and $y$ such that $f(xf(y))=\Delta$. $P(x,y)$ becomes $f(x+\Delta)=x+yf(x)>x$
So $u>v$ implies $f(u)>v$ and so $f(x)\ge x$ $\forall x\in\mathbb Q^+$
(else, if $f(u)<u$ for some $u$, just choose $v$ such that $u>v>f(u)$ and you get contradiction)
So $yf(x)+x=f(f(xf(y))+x)\ge f(xf(y))+x\ge xf(y)+x$ which is $\frac{f(x)}x\ge\frac{f(y)}y$
And since this is true $\forall x,y\in\mathbb Q^+$, we get equality (just swap $x,y$) and $f(x)=cx$ $\forall x\in\mathbb Q^+$ for some $c=f(1)$
Plugging this back in original equation, we get $c=1$ and so $\boxed{f(x)=x\quad\forall x\in\mathbb Q^+}$ which indeed fits