What does$f(f(x))=0$ mean?

I came across a question: If $$f(x)=x^3-x+1$$ then find the number of real distinct values of $$f(f(x))=0$$.

Here is what I interpreted the $$f(f(x))$$ as:

I assumed $$a, b$$ and $$c$$ to be the roots of $$f(x)$$, now if we put $$a, b$$ or $$c$$ in the $$f(f(x))$$ then it becomes $$f(0)$$ which will be equal to $$1$$.

I saw a solution where they differentiated the polynomial $$f(x)$$. They made the graph of $$f(x)$$ using first order derivative test. Then for $$f(f(x))$$, they put in $$x=a, b, c$$ (assumed roots of $$f(x)$$ ). Then we got three lines for $$x=a$$, a line below $$-1$$, for $$b$$ a line between $$0$$ and $$1$$ and for $$c$$, a line between $$1$$ and $$3$$. I am unable to understand why we put $$a,b$$ and $$c$$ as $$x$$ and then how did we get these ranges?

• you mean that you wanna know what $f(f(x)) = 0$ means, right?? Jun 29, 2021 at 3:55
• $f(f(x))=0$ would imply towards "mapping zero to zero". I.e. maybe you're actually expecting $f(f(0))=0$. But this would mean $f(0)=0$. So is $0$ a root? Jun 29, 2021 at 4:05
• @AnsheekaGupta is it from Doubtnut that you took the graph? Jun 29, 2021 at 4:07
• Yes, i saw their solution Jun 29, 2021 at 4:09
• The phrase “the number of real distinct values of $f(f(x))=0$“ doesn’t make sense. Is that an exact quote, or did you translate from another language? Jun 29, 2021 at 11:46

$$f(f(x)) = (x^3 - x + 1)^3 - (x^3 - x + 1) + 1$$.

Solve that $$9$$th-order polynomial for $$f(f(x)) = 0$$.

Here is a plot of $$f(f(x))$$

$$f(f(x))$$ has a single real root at $$x = -1.57387$$.

Also, here is a plot of $$f(x)$$:

Your assumption that there are three real roots of $$x^3 - x + 1$$ is invalid.

Enough yet?

• Huh? Your question asks "What does $f(f(x))=0$ mean?" I answered that. Jun 29, 2021 at 3:50
• Hey i’ve edited my question. Kindly check again Jun 29, 2021 at 3:57
• The issue with the three real roots is due to the fact that OP's polynomial is not the one discussed in the Doubtnut video on Youtube mentioned in the comments (the graph is for $\ x^3 - 3x + 1 \ \ ) .$
– user882145
Sep 16, 2021 at 8:09

If you were looking for the meaning of $$f(fx) =0$$, here's it (I hope you know what a composite function means):

The meaning is that the points where $$f(f(x))$$ evaluates to zero at the points where $$f(x)$$ evaluates to the supposed roots $$a,b$$ and $$c$$. So basically, you only have to check the values of $$x$$ for which this is satisfied. Since your polynomial function has $$a,b$$ and $$c$$ as its roots, you just have to find the roots first, equate them to the actual function and find the $$x$$'s where the function achieves those values.

This is the same thing as what @DavidGStork said, but he went to the ninth degree to solve it. That's all.

$$f(f(x)) = (x^3 - x + 1)^3 - (x^3 - x + 1) + 1 = (x^3-x)^3+1+3(x^3-x)[x^3-x+1]-(x^3-x) = (x^3-x)^3+3(x^3-x)^2+3(x^3-x)-(x^3-x)+1 = (x^3-x)^3+3(x^3-x)^2+2(x^3-x) +1$$

But given $$f(f(x) = 0$$ so $$(x^3-x)^3+3(x^3-x)^2+2(x^3-x)+1 = 0$$....eq.(1) Put $$x^3-x = y$$ in eq.(1) we get $$y^3+3y^2+2y+1 = 0$$....eq.(2). Firstly, solve eq.(2) then solve eq.(1).

• Ummm.... how do you know it has nine REAL roots? Jun 29, 2021 at 4:56
• Yes, I made a mistake. I edited my answer. Jun 29, 2021 at 6:03
• Very nice idea ! So, we have the exact solution of the only real root of $f(f(x))$ (which is surprizingly "close" to $\frac \pi 2$. Jul 18, 2021 at 8:49

It means that you apply the function twice and find the zeroes.

The notation $$f(x)$$ means that you take the function $$f$$, apply it to the input variable $$x$$, and receive some output. $$f(f(x))$$, then, means that you take the output of $$f(x)$$ and apply the function $$f$$ to it. Note that solving $$f(0)$$ is very different to solving $$f(x) = 0$$. If the former case, you're setting the input to zero, and finding what the output is. In the latter case, you're trying to find the input within the range of the variable $$x$$ that produces an output of $$0$$.

If, as in the example you gave, $$f(x) = x^3 - x + 1$$, then you'd take each of those $$x$$s and substitute in $$x^3 - x +1$$. This then gives us the equation $$f(f(x)) = (x^3 - x + 1) ^3 - (x^3 - x + 1) + 1$$, which according to Wolfram Alpha, expands out to $$y = x^9 - 3 x^7 + 3 x^6 + 3 x^5 - 6 x^4 + x^3 + 3 x^2 - 2 x + 1$$.

So, $$f(f(0)) = (0^3 - 0 + 1) ^ 3 - (0^3 - 0 + 1) + 1 = 1 ^3 -1 + 1 = 1$$. However, $$f(f(x)) = 0$$ evaluates to about $$-1.57387$$ (along with eight complex roots, as would be expected of a ninth-degree polynomial), again according to Wolfram Alpha.

Indeed, if you input your equation into Wolfram Alpha, you can see a wide variety of information about it, including graphs of its values.

Leave aside the actual definition of $$f$$, for the moment, and consider two functions $$p$$ and $$q$$: you know what $$p(q(x))$$ means, namely to evaluate $$p$$ with the input $$q(x)$$.

When is it true that $$p(q(x))=0$$? Suppose $$a_1,a_2,\dots,a_k$$ are the values such that $$p(a_i)=0$$, for $$i=1,2,\dots,k$$. Then $$p(q(x))=0$$ if and only if $$q(x)=a_i$$, for some $$i$$.

In your case $$p$$ and $$q$$ are the same function, but it's not of a concern.

There is a single root of $$p=f$$. Indeed $$f'(x)=3x^2-1$$, that vanishes at $$-1/\sqrt{3}$$ and $$1/\sqrt{3}$$, which are a local maximum and a local minimum respectively. Since $$f(1/\sqrt{3})=\frac{1}{3\sqrt{3}}-\frac{1}{\sqrt{3}}+1>0$$ we have the claim. Moreover $$f(-2)=-8+2+1<0$$ and $$f(-1)=-1+1+1>0$$, so we know that the only root $$a$$ for $$f(x)=0$$ satisfies $$-2.

Now you have to solve the equation $$f(x)=a$$. But we already know that $$f$$ only assumes once each negative value, don't we?

Thus $$f(f(x))=0$$ has a single solution.

Strating from @Sangam Academy's answer, the only real solution of $$y^3+3y^2+2y+1 = 0$$ is $$y=-1-\frac{2 }{\sqrt{3}}\cosh \left(\frac{1}{3} \cosh ^{-1}\left(\frac{3 \sqrt{3}}{2}\right)\right)$$

Now, solving $$x^3 -x - y=0$$ only one real solution given by $$x=-\frac{2 }{\sqrt{3}}\cosh \left(\frac{1}{3} \cosh ^{-1}\left(-\frac{3 \sqrt{3} }{2}y\right)\right)=-1.57387$$

I tracked down the Doubtnut video on YouTube from which your graph comes. (The presentation is not entirely in English, but the math comes through well enough.) It should be said that the polynomial being discussed there is $$\ x^3 - \mathbf{3}x + 1 \ \ ,$$ so I'll describe what is being done to solve that problem and then adapt the method to the cubic polynomial under discussion on this page.

As is described in some of the other posts, to ask for the values of $$\ x \$$ at which $$\ f( \ f(x) \ ) \ = \ 0 \ \$$ is to seek those values (such as may exist) at which $$\ f(x) \$$ is equal to any of the zeroes of $$\ f(x) \ \ .$$ This is to say that if $$\ r \$$ is a zero of the function, so that $$\ f(r) \ = \ 0 \ \ ,$$ then the value, say, $$\ x = a \ \ ,$$ for which $$\ f(a) \ = \ r \ \$$ is one for which $$\ f( \ f(a) \ ) \ = \ f(r) \ = \ 0 \ \ .$$

Generally for most functions, solving analytically for the zeroes of a composition of two functions, or a self-composition in this problem, can be very difficult to impossible; we would usually find ourselves using a computational aid. As we are only asked to find the number of real zeroes of $$\ f( \ f(x) \ ) \ \ ,$$ we can resort to a graphical technique; but for that, we will need a graph of $$\ f(x) \ \ .$$

What is being done in about the first half of the video is to construct this necessary graph. (The fact that this is being done, rather than simply getting a plot from a computer utility or on-line source, leads me to suspect that this is a "contest-math" problem, so no device would be available.) The first derivative equation $$\ f'(x) \ = \ 3x^2 - 3 \ = \ 0 \ \$$ is used to find the local extrema ("turning-points") of the function curve, $$\ x = \pm 1 \ \ ,$$ and the function is then evaluated to obtain $$\ f(-1) \ = \ 3 \$$ and $$\ f(1) \ = \ -1 \ \ .$$ From our familiarity with graphs of polynomials (and cubics in particular) and a little help from the Intermediate Value Theorem, the presenter then sketches a version of the following.

This graph is used to obtain the number and approximate values of the zeroes of $$\ f(x) \ \ .$$ It is observed that there are three zeroes: $$\ a \ \ ,$$ "somewhere between -1 and -2" , $$\ b \ \ ,$$ "between 0 and 1", and $$\ c \ \$$ "somewhere between 1 and 2 ". (This approach usually does not require high precision location of the zeroes.)

The presenter then draws in three "level-lines" at $$\ y = a \ , y = b \ , \$$ and $$\ y = c \ \ ,$$ and then looks at the intersections of these lines with the graph of $$\ f(x) \ \ .$$ We don't really care what the $$\ x-$$ coordinates of those intersection points are: we just want to count them. We find that there is one value of $$\ x \$$ ($$\ \approx -2.1 \ \ ;$$ call it $$\ x_1 \$$ for the moment) at which $$\ f(x) = a \ \ ,$$ so $$\ f( \ f(x_1) \ ) \ = \ f(a) \ = \ 0 \ \ .$$ There are three intersection points for $$\ f(x) \ = \ b \$$ and three more for $$\ f(x) \ = \ c \ \ ,$$ so we may conclude that there are seven real values of $$\ x \$$ for which $$\ f( \ f(x) \ ) \ = \ 0 \ \$$ (and it is clear from the graph that there are all distinct). [The presenter apparently forgets to deal with $$\ f(x) \ = \ c \ \$$ and so comes up with a total of four, which is remarked on in the video comments.]

If we apply this procedure to $$\ x^3 - x + 1 \ \ ,$$ the first derivative equation becomes $$\ f'(x) \ = \ 3x^2 - 1 \ = \ 0 \ \ ,$$ indicating that the local extremal values are $$\ f \left(-\frac{1}{\sqrt3} \right) \ = \ 1 + \ \frac{2}{3\sqrt3} \ \$$ and $$\ f \left(\frac{1}{\sqrt3} \right) \ = \ 1 - \ \frac{2}{3\sqrt3} \ > 0 \ \ .$$ [This is noted in a number of the other posted answers.] For the graphical analysis, this means that the curve for $$\ f(x) \$$ intersects the $$\ x-$$axis just once "somewhere between -1 and -2 " . Drawing in the appropriate level-line this time produces only one intersection with the function curve, so there is just one real value of $$\ x \ \approx \ -1.6 \ \$$ here for which $$\ f( \ f(x) \ ) \ = \ 0 \ \ .$$