I was trying to solve
$$ f(a^x)=a^{f(x)} $$ for any $a,x$ .
with $a \in \mathbb{R}$, $x \in \mathbb{R}$ and $f(\cdot)$ ranging where the math does not break down on real line (for example it breaks at $f(x)<0$ and $a=2n+1$ with $n$ as a natural number).
This below is what I've tried:
Take $x=1$ so $f(a)=a^{f(1)}$ as $a$ is real as $x$ does so $f(x)=x^{f(1)}$, then $f(x)=x^{c}$ but $f(a^x)=(a^x)^c$ not $f(a^{x})=a^{x^c}$ (by $f(a^x)=a^{f(x)}$). We might think that $a^{x^{c}}=a^{xc}$ holds for some $c$ so we let know what $c$ is, we have $a^{x^c}$ must be $a^{xc}$ so $a^{x^c}=a^{xc}$ implies to $x^{c}\ln a=xc\ln a$ then $x^c=xc$ so $c$ as constant may be $c=1$ then $f(x)=x$. When I made $a^{x^c}=a^{xc}$ in order to find $c$ have I got loss of generality? Is $f = \operatorname{id}$ the only solution?