Find all functions $f$ such that $f(f(x)) - xf(x)=0$ After watching this Michael Penn video, in which Penn found all $f$ such that $f(f(x))+xf(x)=1$,  I was inspired to try my hand at solving a similar problem:
For $x ∈ ℝ _{≥ 0}$, find all functions $f$ that are continuous in their domain such that $$f(f(x)) - xf(x)=0$$ There is obviously the trivial $f(x)=0$, and if we suppose $f(x)=x^c$ then by the equation above we have that $$f(x^c)-x^{c+1}=0 ⇒ f(x^c)=x^{c+1}$$ By the assumption that $f(x)=x^c$, we have that $ f(x^c)=(x^c)^c=x^{c^2}$, and equating these two yields $$x^{c+1}=x^{c²} ⇒ c+1=c² ⇒ c=\phi ⇒ f(x)=x^\phi$$ where $\phi$ is the golden ratio. (The conjugate of $\phi$ works on $ ℝ _{> 0}$).
I think that these two functions ($f(x)=0$ and $f(x)=x^{\phi}$) are the only solutions, but I am struggling to prove it. I have taken / am taking introductory-level proofs classes, so I may not have the tools (or may not realize that I do have the tools) to prove this myself yet. Any tips?
Edit: specified that I am looking for functions that are continuous in their domain, ie not trying to find piecewise functions that work.
 A: If we let $f(0) = a$, then it must be true that $$f(f(0)) = 0 \to f(a) = 0$$
which means that it must be true that $$f(f(a)) - af(a) = 0 \to f(0) = 0$$
so $f(0)$ must equal $0$.
Also, note that, given that $f(x)$ is continuous, it is strictly monotonic. This is because if $f(x_1) = f(x_2) = y$ for $x_1 < x_2$, then $f(y) - x_1y=0$ and $f(y)-x_2y=0$, which are contradictory unless $y = 0$. But if $y = 0$, then either $f(x)=0$ for $x \le x_2$, or there were two values $x_1<x_3, x_4<x_2$ such that $f(x_3) = f(x_4) \not= 0$, in which case $f(x)$ would not be valid. But if $f(x) = 0$ for $x \le x_2$ and is not $0$ for some value of $x$ greater than $x_2$ ($x = a$), then $f(f(a)) - af(a) = 0 \to f(a) = 0$ which is a contradiction (unless $f(x) = 0$ for all $x$). So the only root is at $x = 0$ and $f(x)$ is monotonically increasing (since the domain is nonnegative).
From here, you can use this Art of Problem Solving post and this MSE answer to finish. Mainly, if a discontinuity at $x = 0$ (and only $x = 0$) was allowed, then the solutions (in addition to $f(x) = 0$) would be $$f(x)=\left\{x^{\phi}, x^{-\frac{1}{\phi}}\right\}$$
But since $f(0) = 0$, the only solutions are $$f(x) = \left\{0, x^{\phi}\right\}$$
