# Existence of two functions $f$ and $g$ for which $f\circ g (x)=x^2 , g\circ f (x)=x^3$

Do there exist two functions $$f$$ and $$g$$ from the reals to itself satisfying $$f\circ g (x)=x^2 , g\circ f (x)=x^3$$ for any $$x\in\mathbb{R}$$?

From the given equations I could get the following information:

1. $$f$$ is injective.

2. $$g$$ is surjective and an even function.

3. $$f(x^3)=f(x)^2$$ for every real number $$x$$.

4. $$g(x^2)=g(x)^3$$ for every real number $$x$$.

How these information help us to decide whether such functions exist or not?

Thank you.

• Hint: Prove that if $S$ and $T$ are two sets, and if $f : S \to T$ and $g : T \to S$ are two maps, then the maps $f \circ g : S \to S$ and $g \circ f : T \to T$ have the same number of fixed points. (The number can be infinite, though -- but not in this case.) – darij grinberg Oct 27 '18 at 23:20
• @darij grinberg Thank you for your help i will try it. Here the fixed points of the first are 0 ,1 while those of the second are -1, 0, 1. So such functions do not exist by the fact you mentioned. How the theorem is restated for infinite fixed points? – Fermat Oct 27 '18 at 23:30
• The general statement is that there is a bijection from the set of fixed points of $f \circ g$ to the set of fixed points of $g \circ f$. (Can you find this bijection? It's very simple.) – darij grinberg Oct 27 '18 at 23:33
• If $a$ is a fixed point of $f\circ g$, then $g(a)$ is a fixed point for $g\circ f$. The other direction is similar. – Fermat Oct 27 '18 at 23:52
• @Fermat , should $f, g$ be injective? – Doyun Nam Oct 28 '18 at 0:25

Say, $$f(0) = a$$. Then $$f\circ g\circ f(0) = f(0^3)=a$$, but at the same time it equals $$f(0)^2=a^2$$. So $$a$$ is either $$0$$ or $$1$$.
The same reasoning applies to $$f(1)$$ and $$f(-1)$$, with the same result. So at least some of these three values must coincide, which contradicts with $$f$$ being injective.