I attempted to solve the equation given in the title for the function;

$$f: \mathbb R_{++} \to\mathbb R_{++}; \quad f(x)=x^2(x+2)$$

I understand that the problem is equivalent to solving $f(f(x))=x$ but since this seemed like too much work, I had a look at the solution and it stated that;

$$ f^{-1}(x)=f(x) \Longrightarrow f(x)=x$$

I don't understand why this is the case. Can someone please explain this?


  • 1
    $\begingroup$ It is not true in general; although $f(x)=x$ implies $f(f(x))=x$ the reverse is not always true. Consider $f(x)=-x$ $\endgroup$ – Mario Carneiro May 28 '15 at 14:51
  • $\begingroup$ Your particular function isn't invertible for negative $x$, so $f^{-1}$ doesn't even make sense in the first place without giving the domain and codomain of $f$. $\endgroup$ – AlexR May 28 '15 at 14:54
  • $\begingroup$ Were you given an interval to restrict $f$ to? $\endgroup$ – Clarinetist May 28 '15 at 14:54
  • $\begingroup$ Thanks.That makes sense. So does that mean I must solve the equation $f(f(x))=x$ ? $\endgroup$ – J.Gudal May 28 '15 at 14:54
  • $\begingroup$ @AlexR,Clarinetist, I'm sorry, I forgot to mention that. Its domain is $x>0$. $\endgroup$ – J.Gudal May 28 '15 at 14:55

Although $f(f(x))=x\implies f(x)=x$ is not always true, it is true if $f$ is an increasing function (even if only weakly increasing).

Suppose that $f(x)=y$ and $f(y)=x$. If $x\le y$, then $f(x)=y\le f(y)=x$, and vice-versa.
So either way, both $x\le y$ and $y\le x$ are true, and thus $x=y$ and $f(x)=x$.

So your book is not off the rails; this is a valid approach to the problem.

  • 1
    $\begingroup$ Thanks that was really helpful. Yes I think it should have mentioned that. $\endgroup$ – J.Gudal May 28 '15 at 15:09
  • 1
    $\begingroup$ I've added a few line breaks for readability, took me a moment to verify the proof, but it's nice ;) (+1) $\endgroup$ – AlexR May 28 '15 at 15:11
  • $\begingroup$ Your answer is really useful. May I know what is meant by "weakly increasing function". Do you mean monotonic functions? $\endgroup$ – M. Guru Vishnu Sep 14 at 8:28
  • 1
    $\begingroup$ @Intellex Yes. In calculus "monotonic" often means "weakly increasing or weakly decreasing" so I avoid that terminology here. $x\le y\to f(x)\le f(y)$ $\endgroup$ – Mario Carneiro Sep 15 at 11:38

Since $f: \mathbb R_{++} \to \mathbb R_{++}$ is settled in the comments, your idea is good. Write $f(x) = x^3 + 2x^2$ to reduce the complexity of $f(f(x))$ and then solve $$f(f(x)) = (x^3+2x^2)^3 + 2(x^3 + 2x^2)^2 \stackrel!= x \qquad x>0$$ We can expand this to $$x^9 + 6x^8 + 12x^7 + 8x^6 + 2x^6 + 8x^5 + 8x^4 - x = 0$$ Then divide by $x$ since $x\ne 0$ for $$x^8 + 6x^7 + 12x^6 + 8x^5 + 2x^5 + 8x^4 + 8x^3 - 1 = 0$$ WolframAlpha tells us there is only one positive root at $$x = \sqrt 2 - 1$$

  • $\begingroup$ I got to that stage but thought it was too hideous, and so must be wrong. I think the solution had an error. Thanks anyway. $\endgroup$ – J.Gudal May 28 '15 at 15:01
  • $\begingroup$ @AlexR The implication is not false in this case - see my answer. $\endgroup$ – Mario Carneiro May 28 '15 at 15:03
  • $\begingroup$ @MarioCarneiro Yes, I saw it, but the solution should have mentioned why it wasn't false ;) $\endgroup$ – AlexR May 28 '15 at 15:05
  • $\begingroup$ The solution assumed that $f(x)=x$ and so concluded that $x= \sqrt{2}-1$ $\endgroup$ – J.Gudal May 28 '15 at 15:06
  • $\begingroup$ @J.Gudal I had a mistake in my original post. Fixed it not to come up with the same solution. $\endgroup$ – AlexR May 28 '15 at 15:10

If the problem were to find a solution of $f^{-1}(x)=f(x)$ with $x\gt0$, then the hint would be useful if the implication were reversed, i.e.,

$$f(x)=x\implies f^{-1}(x)=f(x)$$

Setting $x^2(x+2)=x$ leads to the equation


which has positive solution $x=\sqrt2-1$.

But we can say more. Borrowing the degree-$8$ polynomial from AlexR's answer, we know that $x^2+2x-1$ must be a factor of it. And indeed it is:


and since the coefficients of $x^6+4x^5+5x^4+4x^3+5x^2+2x+1$ are all positive, the degree-$8$ polynomial has no other solutions with $x\gt0$. So $x=\sqrt2-1$ is not only a solution, it's the only solution.


Answering this problem is simple.

f(x) = x^2(x+2)

Thus f(x) = a(x)b(x) where a(x) = x^2 and b(x) = x+2

The product rule tells us that:

f'(x) = 3x^2 + 4x

Thus solve for f(x) = f(x)':

x^2(x+2) = 3x^2 + 4x

x(x^2 -x - 4) = 0

Therefore x = 0; x = (1±sqrt[17])/2

  • $\begingroup$ I think you may have misunderstood the question. $\endgroup$ – J.Gudal May 28 '15 at 15:17
  • $\begingroup$ $f^{-1}$ and $f'$ are two completely different things... $\endgroup$ – AlexR May 28 '15 at 15:19
  • $\begingroup$ My bad I thought you said f' $\endgroup$ – Benjamin Gunn May 28 '15 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.