Task 10.2. How many roots does the equation

$$
\overbrace{f(f(\ldots f}^{10 \text { times } f}(x) \ldots))+\frac{1}{2}=0
$$

have, where $f(x)=|x|-1$?
Answer: 20.

Solution. Let

$$
f_{n}(x)=\overbrace{f(f(\ldots(f}^{n \text { times } f}(x) \ldots))
$$

We will solve the equation $f_{10}(x)=-\frac{1}{2}$ graphically.

We will use the fact that the graph of $y=f_{k}(x)$ can be obtained from the graph of $y=f_{k-1}(x)$, based on the relation $f_{k}(x)=\left|f_{k-1}(x)\right|-1$. Specifically, to construct the next graph, we need to take the previous one, reflect all points with negative ordinates relative to the x-axis (obtaining $y=\left|f_{k-1}(x)\right|$), and then shift the entire graph down by 1.

We start with the graph of $y=f(x)$ (the gray line represents $y=|x|$):

![](https://cdn.mathpix.com/cropped/2024_05_06_2befe970655743580344g-09.jpg?height=165&width=711&top_left_y=963&top_left_x=371)

Reflecting its lower part relative to the x-axis, we get $y=|f(x)|$ (depicted below in gray), and shifting it down by 1, we get $y=f_{2}(x)$:

![](https://cdn.mathpix.com/cropped/2024_05_06_2befe970655743580344g-09.jpg?height=172&width=711&top_left_y=1246&top_left_x=371)

Repeating this process 8 more times, we arrive at the following graph:

![](https://cdn.mathpix.com/cropped/2024_05_06_2befe970655743580344g-09.jpg?height=183&width=721&top_left_y=1487&top_left_x=366)

It is clear that it has exactly 20 intersections with the line $y=-\frac{1}{2}$.