# Number of solutions of an equality with absolute value operator

Consider:

$$\left|\left|\left|x-1\right|-2\right|-4\right|=4$$

What is the number of solutions for this equation? This one was particularly easy to me. If first observed that if this inequality were to hold, then $$| x - 1 |$$ should be 9. Because $$| x -1 |$$ will always be positive, and once we remove $$| x- 1 |$$, the only positive number that can lead to a possible solution is 9. So solving for $$| x - 1 |$$ gives me $$10$$ or $$-8$$, and I'm done. Number of solutions is 2.

But I was curious on what I'd do if I had different numbers. Say:

$$\left|\left|\left|x-1\right|-2\right|-5\right|=4$$

Now, Desmos says there are five possible solutions. How should one go about finding the number of solutions (or finding the solutions themselves) for something like this by hand? A general method would be appreciated.

• Each absolute value will double the maximum number of solutions. (Maximum number of solutions because zero may be an intermediate solution or two branches may give the same solution.) Mar 24 '19 at 12:35

You can solve this by "going from the outside to the inside" of the equation and analyzing the different cases.

For your first example, it has to be true that

$$||x-1|-2|\in\{8,0\},$$ for the $$0$$ case, it follows that $$|x-1|=2\iff x\in\{3,-1\}.$$

For the $$8$$ case, it follows that $$|x-1|-2=\pm 8\implies |x-1|\in\{10,-6\},$$

which is only possible for $$|x-1|=10\implies x-1=\pm 10,$$

which leads to $$x\in\{11,-9\}.$$

So, there are $$4$$ solutions in total, namely

$$x\in\{-9,-1,3,11\}.$$

Open one-by-one (remember, absolute value is always nonnegative): $$\left|\left|\left|x-1\right|-2\right|-4\right|=4 \iff \\ \left|\left|x-1\right|-2\right|-4=\pm 4 \iff \left|\left|x-1\right|-2\right|=0;8 \iff \\ |x-1|-2=\pm(0;8) \iff |x-1|=2;10 \iff \\ x-1=\pm(2;10) \iff x=-9;-1;3;11.$$