Solving a functional relation $f\left( x \cdot f(y)\right)=x^2 \cdot y^a$

OK, I make my comment more precise. Put $y=1$, you get $f(xf(1))=x^2$. Hence $f(1)\not =0$, (if $f(1)=0$, then $x^2=f(0)$ for all $x$, a contradiction). If I put $z=xf(1)$, I get $f(z)=\frac{z^2}{(f(1))^2}$ for all $z$. I put $z=1$, it gives $f(1)^3=1$, hence $f(1)=1$. We have proven that if a solution exists, then it is $f(x)=x^2$. Hence: if $a\not =4$, there is no solutions. If $a=4$, there is only one solution, $f(x)=x^2$.


For $x>0$: $$f(f(x))=x^a$$ $$f(\sqrt x f(1))=x$$ so $$f(x)=f(f(\sqrt xf(1)))=\sqrt{x^a}f(1)^a$$

This would determine $f$, chosen $f(1)$ and $a$.

Now, let's see if we really can choose:

$$x^2y^a=f(xf(y))=f(x\sqrt{y^a}f(1)^a)=x^{a/2}y^{a^2/4}f(1)^{3a/2}$$

For $y=1$: $$x^4=x^af(1)^{3a}\quad\forall x>0$$ hence $x^{4-a}$ is constant, so it must be $a=4$, $f(1)=1$. So finally $$f(x)=x^2$$