On my spare time, I'm trying to solve equations of the form $$f^{\circ n}(x)=f(x)^k,\quad n,k\in \mathbb{Z}$$ where $f^{\circ n}(x)=f\circ f\circ\dots\circ f$, $n$ times. I know $f(x)=x^{\sqrt[n-1]{k}}$ is a solution, but I cannot prove if there's a more general solution. How did I get the solution? I assumed that the equation had a solution of the form $x^t$, then I solved for $t$ in : $x^{tk}=f(x)^k = f^{\circ n}(x) = x^{t^n}$
For $n=2$ and any $k$, that is $f\circ f(x) = f(x)^k$, I am able to prove that the only solution is $f(x)=x^k$, without using my general solution.
My problem lies when $n>2$ or $n<0$ (inverse functions).
For instance, for $f\circ f\circ f(x)=f(x)$, I know the solution $f(x)=x^{\pm1}$ works (from my general solution), but I can't prove how to get it without using my general solution, and I can't prove its uniqueness.
Same goes for $n=k=-1$, in other words $f^{-1}(x) = \frac{1}{f(x)}$. I know $f(x)=x^{\pm i}$ is a solution (from my general solution), I can't get there without my general solution and I can't prove the uniqueness.
I tried taking the derivative and solving this way (it worked for $n=2$), but got nowhere.