TITLE: Determine all functions satisfying $f\left ( f(x)^{2}y \right )=x^{3}f(xy)$
QUESTION [15 upvotes]: Denote by $\mathbb{Q}^{+} $  the set of all positive rational numbers. Determine all functions $f:  \mathbb{Q}^{+} \rightarrow \mathbb{Q}^{+}$ which satisfy the following equation for all $x,y \in \mathbb{Q}^{+}:$ $$f\left ( f(x)^{2}y \right )=x^{3}f(xy).$$

What I have tried is ...
 By substituting $y=1$, we get $$f\left ( f(x)^{2} \right )=x^{3}f(x).$$
Then, whenever $f(x)=f(y)$, we have $$x^{3}= \frac{f\left ( f(x)^{2} \right )}{f(x)}= \frac{f\left ( f(y)^{2} \right )}{f(y)}=y^{3}$$ which implies $x=y$, so the function $f$ is injective. and I think I'm stuck here, any help will be appreciated, thanks.
Note that it's an Olympiad question (IMO2010 SL, Problem A5).

REPLY [4 votes]: Let $P(x,y)$ be the assertion:
$$
f(f(x)^2y)=x^3f(xy)\space\forall x,y\in\mathbb{Q^+}
$$
We get (due to the injectivity):
$$
P(1,y): f(f(1)^2y)=f(y)\iff f(1)^2y=y\iff f(1)=1
$$
$$
P(x,f(y)^2): f(f(x)^2f(y)^2)=x^3f(xf(y)^2)=x^3y^3f(xy)
$$
$$
P(xy,1): f(f(xy)^2)=x^3y^3f(xy)
$$
If we combine the last to results, we get:
$$
f(f(xy)^2)=f(f(x)^2f(y)^2)\iff f(xy)=f(x)f(y)
$$
Now define $g(x):=xf(x)$:
$$
P(x,x^2): f(x^2f(x)^2)=x^3f(x^3)\iff f(x)^2f(f(x))^2=x^3f(x^3)\iff g(f(x))=g(x)^{\frac{3}{2}}
$$
If we iterate this relation, we obtain:
$$
g(x)^{\frac{3^n}{2^n}}=g(f^n(x))
$$
Where $f^n$ denotes the $n$-th iteration of $f$. Therefore, since $g(x)^{\frac{3^n}{2^n}}$ is rational, $g(x)^{\frac{1}{2^n}}$ needs to be rational to for all $n\in\mathbb{N_0}$ and thus $g(x)=1$. Therfore, we obtain the only solution:
$$
f(x)=\frac{1}{x}\space\forall x\in\mathbb{Q^+}
$$