# How to solve this function equation or plot its numerical image

I can solve the function equation $$f(f(x))=x$$ with the following code:

WolframAlpha["solve f(f(x))=x", {{"SolutionAsAFunctionalEquation", 1},
"Content"}]


But for the function equation $$f(f(\mathrm{e}^{x}))=x^{x}$$, the above code can't solve it:

WolframAlpha["solve f(f(E^x))=x^x", {{"SolutionAsAFunctionalEquation",
1}, "Content"}]


What can I do to solve this function equation with MMA?

In addition, if this function equation can't get an analytic solution, can we plot the image of its numerical solution with MMA?

If none of the above can be obtained, it is acceptable to find an analytical or numerical solution with a small error in a certain interval.

In addition, there is a graphs of some interval of the function equation in the textbook. I want to know how he drew them:

Other examples for testing(cvgmt):

$$\forall x \neq 0$$, there exists $$f(x)+f\left(\frac{x-1}{x}\right)=2 x$$. Now I want to find the possible expression of $$f(x)$$.

• This discussion on mathoverflow is relevant mathoverflow.net/questions/17614/solving-ffx-gx Commented Feb 23, 2020 at 9:24
• Just to add some context to finding a functional square root. The first equation is known as the Babbage equation. The second equation is quite similar to $f(f(x))=e^x$ for which the Kneser solution is known. I guess, one can reduce your equation to this form. Commented Feb 23, 2020 at 9:37
• @yarchik Thank you very much. Even if the analytical solution can not be found, it is acceptable to draw the graph of its numerical solution with MMA. Commented Feb 23, 2020 at 10:01
• You are looking for a functional square root of $\log(x)^{\log(x)}$. I asked about functional square roots / 'half-iterates' here and I found it's possible to learn the function using a neural net - though this technique doesn't always work. The Carleman matrix approach in other answers is worth investigating but I could not get a valid matrix for this function. Commented Oct 2, 2020 at 21:48