# $f(x+1)=f(x)+1$ and $f(g(x))=g(f(x))$

Let $g_1(x)=x+1$ and $g_2(x)=x^2$ be two real functions. Then it is known that whenever $f$ commutes with $g_1$ and $g_2$, $f$ is the identity function. But in this example we choosed 2 particular functions $g_1$ and $g_2$, and we had the conclusion that $f$ is the identity. We can also choose $g_2(x)=x^{2k}$ and get the same result. Based on that, I wonder if there is some necessary and sufficient condition on $g_1$ and $g_2$ so that whenever $f$ commutes with $g_1$ ($f\circ g_1 = g_1 \circ f$) and $g_2$ ($f\circ g_2 = g_2 \circ f$), it will force $f$ being the identity function over $\mathbb{R}$, or at least a necessary and sufficient condition on $g_2$ once $g_1(x)=x+1$ is fixed. Thanks.

-
@Dij: This site works bet when one asks concrete questions. Presumably, you are asking "Are there necessary and sufficient conditions to impose on $g_1$ and $g_2$ so that any function $f$ which commutes with $g_1$ and $g_2$ must be the identity?" If that is correct, it would be best to edit your post and make your question precise. I would also recommend taking some time to tidy up the post. The question itself is a fine one, but the formatting does need some work. – JavaMan Dec 6 '11 at 19:48
If I recall right, then functions are commutative iff they are their iterates. This is then especially the case if $\small g(x)=f^{\circ -1}(x)$ but also $\small I(x)=I=f^{\circ 0}(x)$ . If that statement were true then the answer to your question were easy. Perhaps you search for keyword "functional iteration", too, besides of "commuting functions". Sorry I don't have it more exact... – Gottfried Helms Dec 6 '11 at 23:25
Here's an earlier question by the OP, one of the answers to which proves the assertion at the beginning of the present question: math.stackexchange.com/questions/57928/fx1-fx1-and-fx2-fx2. (Linking to that question in the present question would have been a good idea.) – joriki Dec 11 '11 at 19:52

There is an answer if your functions are regular enough. Among the transseries, for example: If $V$ is a large positive transseries, and $V(x+1) = V(x)+1$, then in fact $V(x) = x+c$ for some $c$.