Question:
If $p,q$ are positive integers, $f$ is a function defined for positive numbers and attains only positive values such that $f(xf(y))=x^py^q$, then prove that $p^2=q$.
My solution:
Put $x=1$. So, $f(f(y))=y^q$, then evidently, $f(y)=y^{\sqrt{q}}...(1)$ satisfies this.
Now, put $x=y=1$, to get $f(1)=1$
Now, put $y=1$. So, $f(x)=x^p...(2)$
Equalising $f(a)$ for an arbitrary constant $a$ from the two equations $(1)$ and $(2)$, we get: $a^{\sqrt{q}}=a^p$ or $p^2=q$. $\blacksquare$
Is this solution correct? I am particularly worried because I have solved this six marks question in a four line solution which wouldn't make my prof very happy...
There is a major gap in your argument.
You've correctly argued that any $f$ satisfying the functional equation $f(x f(y)) = x^p y^q$ must also satisfy the functional equation $f(f(y)) = y^q$.
It is correct that $f(t) = t^\sqrt{q}$ is one solution to the functional equation $f(f(y)) = y^q$.
However, you have made no attempt to show it is the only solution. In fact, other solutions to this functional equation exist; a simple one is that $f(t) = 17/t$ satisfies $f(f(y)) = y^q$ when $q=1$. More complicated solutions exist too.
Thus, you have not shown that any $f$ satisfying $f(x f(y)) = x^p y^q$ must also satisfy $f(t) = t^\sqrt{q}$. Some possible ways to continue are: