Consider the absolute value equation:

|x| + |x-2| +|x-4|= 6

How to find the solution(s)?

My attempt:

For |x|, we got x, for x>=0 and -x, for x <0

For |x-2|, we got x-2, for x >= 0 and -(x-2), for x<0

For |x-4|, we got x-4, for x>=0 and -(x-4), for x<0

After this, I'm confused how to find the solutions? is it any easy way to find the solution?


  • $\begingroup$ you have to do case work $\endgroup$ – Dr. Sonnhard Graubner Sep 29 '14 at 18:16
  • $\begingroup$ $x\geq 4$, $2\le x<4$, $0\le x<2$, $x<0$ $\endgroup$ – Dr. Sonnhard Graubner Sep 29 '14 at 18:17
  • 1
    $\begingroup$ And accordingly, you get: $x={4,4,0,0}$, which gives, $x={4,0}$ $\endgroup$ – Sudeepan Datta Sep 29 '14 at 18:20

I think you misunderstand the absolute value.

Note that $$|x|=\begin{cases}x &\text{if $x\ge 0$}\\-x &\text{if $x\lt 0$}\end{cases}$$ So, for example, $$|x-2|=\begin{cases}x-2 & \text{if $\color{red}{x-2}\ge 0$}\\-(x-2)& \text{if $\color{red}{x-2}\lt 0$}\end{cases}$$

So, for your question, separate it into four cases as

(1) $x\lt 0$.

(2) $0\le x\lt 2$.

(3) $2\le x\lt 4$.

(4) $x\ge 4$.


You have 3 "nodes" for switching $|x|$ , $|x-2|$ and $x-4|$. The easiest way is to imagine real line with these points and split solution considering intervals $[-\infty,0],[0,2],[2,4],[4,\infty]$ separately. On each interval you can remove $||$ with certain sign and immediately solve the equation, checking that final solution is in the corresponding interval.

  • $x<0$ leads to $6-3x=6$

Solve this equation and check wether the solution satisfies $x<0$. If so then you have found a solution of the original equation. If not then no solution exists that satisfies $x<0$.

Do the same for the cases:

  • $0\leq x<2$

  • $2\leq x<4$

  • $4\leq x$


Define $n = x - 2$, and rewrite the equation.

$$|n-2| + |n| + |n+2| = 6$$

In this form we can easily see that if $n$ is a solution, so is $-n$. Thus WLOG we will assume that $n$ is positive. We can then remove some redundant $|\cdot|$s.

$$|n-2| + (n) + (n + 2) = 6 \implies |n-2| + 2n = 4$$

Clearly then, because $|n-2| \geq 0$, we have $|n-2| + 2n = 4 \implies n \leq 2$. This means that $n-2 \leq 0$ and so we can remove another $|\cdot|$.

$$-(n-2) + 2n = 4 \implies n = 2$$

And thus we have two solutions, $n = \pm 2$ or $\boxed{x = 0, 4}$.

  • $\begingroup$ Aren't there four solutions for the equation, -2, 0, 4 and 2? ±2 represents two solutions -2 and 2, because the symbol ± means positive OR negative, not positive AND negative. $\endgroup$ – Toby Mak Apr 16 '17 at 7:38
  • $\begingroup$ @TobyMak, $x-2=n=\pm 2$, therefore $x=\pm 2 + 2=0,4$. Certainly $-2$ and $2$ are not solutions to the original equation. $\endgroup$ – Ben Frankel Apr 16 '17 at 18:02
  • $\begingroup$ Sorry for my misunderstanding $\endgroup$ – Toby Mak Apr 16 '17 at 23:39

Think of the modulus function measuring the distance from fixed points. So that $|x|=|x-0|$ is the distance from $0$.

So your sum measures the total distance from the points $0,2,4$

If $x$ is greater than $4$ the first two distances are greater than $4$ and $2$

If $x$ is less than $0$ we reach the same conclusion with the last two points by symmetry.

If $x$ is between $0$ and $2$ the total distance to $0$ and $2$ is always $2$, and the remaining distance is less than $4$. Similarly by symmetry for the points between $2$ and $4$.

Now check the points $0$, $2$, $4$ themselves


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.