# Functional equation: composition to get quadratic

Consider the following functional equation: $$f(f(x))=x^2+x-7\quad\quad\forall\; x\in\mathbb{R}.$$ Does there exist a function $$f:\mathbb{R}\to\mathbb{R}$$ satisfying this, or not?

• This puzzle may be a bit too hard. If it goes unsolved for a while, I'll add a hint. – Rand al'Thor Feb 5 at 14:09
• rot13(V'z cerggl fher fhpu n shapgvba qbrfa'g rkvfg, ohg V unir ab vqrn ubj gb cebir vg.) – user Feb 5 at 14:16
• @user Oh interesting! That solves the problem for sure, but it can be done (at least in this case) without using all of that complex machinery. – Rand al'Thor Feb 5 at 14:36
• If $x = 0$, we have the property $f(f(0)) = -7$. Wonder if that helps? – new QOpenGLWidget Feb 5 at 15:13
• Ah, but while the main theorem proved in the article is about functions C -> C, the last section comments briefly on the R->R situation and there's a theorem there that resolves this problem. – Gareth McCaughan Feb 5 at 17:41

## 1 Answer

Let's look at fixed points. And let's write $$f^2(x)$$ for $$f(f(x))$$.
$$f^2(x)=x$$ has two fixed points: $$\pm\sqrt 7$$. These are also fixed points of $$f^4(x)$$, together with $$-1\pm\sqrt 6$$, which are swapped by $$f^2(x)$$.
As $$f$$ maps any fixed point of $$f^n$$ to a fixed point of $$f^n$$, $$f$$ restricted to the four points $$\pm\sqrt 7,-1\pm\sqrt 6$$ is a permutation. $$f^2$$ being a square must be even but we have just seen that $$f^2$$ is an elementary permutation, hence odd. Contradiction.

• I'm pretty sure this answer is right, just using terminology I'm not familiar with. What's "an elementary" in this context? – Rand al'Thor Feb 5 at 16:35
• @Randal'Thor An "elementary permutation" or "transposition" is a permutation that swaps two elements and does nothing else. – Paul Panzer Feb 5 at 16:39
• Aha, got it. I knew it by the term transposition, hadn't heard (or have forgotten hearing) it called an elementary. Can you just expand slightly in your answer on why an odd permutation is not possible? Also, I'm curious how you hit upon the right idea of what to use, as expressed in the first line of your answer. Experience with this type of functional equation? A lucky guess? Checking the article @user linked in a comment? I created this puzzle inspired by seeing the solution to another similar one, so I'm not sure how one would find that idea during the solving process. – Rand al'Thor Feb 5 at 16:42
• @Randal'Thor done. Re the finding. Not sure what I was thinking but when composing a function with itself fixed points are a natural thing to look at. Also, once you have arrived at some map shuffling roots of a polynomial if you've ever been exposed to Galois theory you kind of know what to do. – Paul Panzer Feb 5 at 17:04