# Show for $f(x)=x^4 + 2 x^3 + 3 x^2 + 3x + 1$ that if (real) $x$ satisfies $f(f(x)) = x$ then in fact $f(x) = x$

Define $$f(x)=x^4 + 2 x^3 + 3 x^2 + 3x + 1.$$

Show that if $$f(f(x)) = x$$ then $$f(x) = x$$.

We can write $$f(x)=x^4+2x^3+3x^2+x+1$$ and $$x=f(x)^4+2f(x)^3+3f(x)^2+f(x)+1$$, and subtracting the two equations yields $$-(f(x)^4+2f(x)^3+3f(x)^2+2f(x)+1)=x^4+2x^3+3x^2+2x+1 .$$ Factoring yields $$-(f(x)^2+f(x)+1)^2=(x^2+x+1)^2$$, so either $$x^2+x+1=f(x)^2+f(x)+1 \qquad \textrm{or} \qquad x^2+x+1=-(f(x)^2+f(x)+1) .$$ How do we now show that if $$f(f(x)) = x$$ for some (real) $$x$$ then in fact $$f(x) = x$$?

• $f(x)$ does not have any global inverse. May 14 at 4:50
• Are you trying to solve $f(x)=x$, or $f(f(x))=x$? Your title says the former, while the question body says the latter. Which is it? May 14 at 5:04
• @ProblemDestroyer Your $\,f\,$ is not bijective, thus not invertible, so there is no $\,f^{-1}\,$ to speak of. This was pointed out in an early comment.
– dxiv
May 14 at 5:30
• The degree-$16$ polynomial $g(x) := f(f(x)) - x$ is positive everywhere and in particular has no (real) roots, so the claim that $f(f(x)) = x$ implies $f(x) = x$ for real $x$ is vacuously true. May 14 at 5:35
• @ProblemDestroyer I've (significantly) adjusted the wording of the problem statement based on your comments. Please ensure that I've preserved the intended meaning and revert/adjust accordingly. N.b. I did not change the computational error in the first display equation of your attempt, since I'm not certain what you intended for that line. May 15 at 18:23

We can generalize the phenomenon observed for this particular function $$f$$: For any monic polynomial $$p$$ of degree $$d > 0$$---in our case, $$p(x) = x^2 + x + 1$$, $$d = 2$$---define the polynomial $$f(x) := p(x)^2 + x ,$$ which has degree $$2 d$$. By construction the solutions of $$f(f(x)) = x$$ are the roots of the polynomial $$f(f(x)) - x = p(p(x)^2 + x)^2 + p(x)^2,$$ which has degree $$4 d^2$$ If $$a$$ is a root of $$p$$ of order $$k$$, so that $$p(x) = (x - a)^k r(x)$$ for some polynomial $$r$$, substitution shows that it's also a root of $$f(f(x)) - x$$ of order (at least) $$2 k$$, hence $$f(f(x)) - x$$ is divisible by $$p(x)^2 = f(x) - x$$. Moreover, $$f(f(x)) - x$$ admits a polynomial factorization \begin{align*} f(f(x)) - x &= p(x)^2 \cdot \frac{f(f(x)) - x}{p(x)^2} \\ &= (f(x) - x) \cdot \frac{p(f(x))^2 + p(x)^2}{p(x)^2}, \end{align*} that is, $$\boxed{f(f(x)) - x = (f(x) - x) (q(x)^2 + 1)} , \qquad q(x) := \frac{p(f(x))}{p(x)} .$$ (Here $$\deg q = 2 d^2 - d$$.) (For $$d = 1$$, it seems $$q = p + 1$$ and for $$d = 2$$, $$q = p^3 + p' p + 1$$.)
In particular, for real $$x$$ the factor $$q(x)^2 + 1$$ is always positive, so if $$x$$ is a real solution of $$f(f(x)) = x$$, i.e., a real root of $$f(f(x)) - x$$, then it must be a root of $$f(x) - x$$, i.e., a solution of $$f(x) = x$$.
Example ($$d = 2$$) Write $$p(x) = x^2 + b x + c .$$ Then, $$f(x) = x^4 + 2 b x^3 + (b^2 + 2 c) x^2 + (2 b c + 1) x + c^2$$ and $$\begin{multline}q(x) = x^6 + 3 b x^5 + 3(b^2 + c) x^4 + (b^3 + 6 b c + 2) x^3 \\+ 3(b^2 c + c^2 + b) x^2 + (3 b c^2 + b^2 + 2 c) x + (c^3 + b c + 1) .\end{multline}$$
The question is not so clear. Anyway, there are no real solution to the equation $$f(x)=x$$. Namely from $$x^4 + 2x^3 + 3x^2 + 3x + 1 = x$$ you get $$x^2 \left( {x^2 + 2x + 1} \right) + \left( {3x^2 + 2x + 1} \right) = 0$$ and $$x^2 \left( {x^2 + 2x + 1} \right) \ge 0$$ for every $$x \in \mathbb R$$ while $$\left( {3x^2 + 2x + 1} \right) > 0$$ for every $$x \in \mathbb R$$.