TITLE: If $f(xy)=f(x)f(y)$ then show that $f(x) = x^t$ for some t
QUESTION [28 upvotes]: Let  $f(xy) =f(x)f(y)$ for all $x,y\geq 0$. Show that $f(x) = x^p$ for some $p$. 

I am not very experienced with proof. If we let $g(x)=\log (f(x))$ then this is the same as  $g(xy) = g(x) + g(y)$ 
I looked up the hint and it says let $g(x) = \log f(a^x) $ 
The wikipedia page for functional equations only states the form of the solutions without proof.
Attempt 
Using the hint (which was like pulling a rabbit out of the hat)
Restricting the codomain $f:(0,+\infty)\rightarrow (0,+\infty)$
so that we can define the real function $g(x) =  \log f(a^x)$ and we
have $$g(x+y) = g(x)+ g(y)$$ 
i.e $g(x) = xg(1)$ as $g(x)$ is continuous (assuming $f$ is).
Letting $\log_a f(a) = p$ we get $f(a^x) =a^p $. I do not have a rigorous argument but I think I can conclude that $f(x) = x^p$ (please fill any holes or unspecified assumptions) Different solutions are invited

REPLY [6 votes]: Both the answers above are very good and thorough, but given an assumption that the function is differentiable, the DE approach strikes me as the easiest.
$ \frac{\partial}{\partial y} f(x y) = x f'(xy) = f(x)f'(y) $
Evaluating y at 1 gives:
$ xf'(x) = f(x)f'(1) $
The above is a separable DE:
Let $ p = f'(1) $ and $ z = f(x) $
$ x\frac{dz}{dx} = pz \implies \int \frac{dz}{z} = p\int \frac{dx}{x}$
$ \therefore \ln|z| = p\ln|x| + C $
Let $ A = e^C $. $ \implies C = \ln(A) $
$ x > 0 \implies |x| = x $
$ \therefore \ln|z| = p\ln(x) + \ln(A) = \ln(x^p) + \ln(A) = \ln(Ax^p) $
Hence $ |z| = Ax^p $; $ z = \pm Ax^p = f(x)$
Let $ B = \pm A $ and now $ f(x) = Bx^p $
Now using the initial property:
$ f(x)f(y) = Bx^p By^p = B^2 (xy)^p = f(xy) = B (xy)^p $
$B^2 = B \implies B $ is $0$ or $1$.
If B is zero, that provides the constant function $ f(x) = 0 $, otherwise the solution is $ f(x) = x^p $.
As can be seen from the other answers, this does not capture all possible solutions, but sometimes that's the price of simplicity.