A question regarding absolute value.

$$|x-2|+|x+3|= 5$$

What are the real values of $x$ satisfies the equation?

I tried doing this but it somehow did not work. Could someone explaim why please? Here's my workings :

$$|x-2|+|x+3|=5$$ $$\Rightarrow (x-2)+(x+3)=5$$ $$\Rightarrow x+2+x+3=5$$ $$\Rightarrow x=6$$ $$\Rightarrow x=3$$

The answer is $[-3,2]$

• Is your first equation written correctly? Is this an inequality or an equality? – turkeyhundt Jun 11 '17 at 3:29

hint

if $a\ge 0$ then $|a|=a$.

if $a\le 0$ then $|a|=-a$.

$$x-2\ge 0\iff x\ge 2$$ $$x+3\ge 0\iff x\ge -3$$

hence

in $[2,+\infty)$

$x\ge 2\implies |x-2|+|x+3|=(x-2)+(x+3)$

$=2x+1=5\implies x=2$

conversly, we check that $2$ is a solution.

in $[-3,2)$

$-3\le x <2\implies |x-2|+|x+3|=-(x-2)+(x+3)=5$

the equation is satisfied for $-3\le x <2$.

in $(-\infty,-3)$

$x <-3\implies |x-2|+|x+3|=-(x-2)-(x+3)$

$=5-2x=5\implies x=0\notin (-\infty,-3)$

we conclude that the solutions set is $$[-3,2]$$

• I don't understand the [2,infinity) ---->x=2 – Ayse Jun 11 '17 at 3:07
• @Ayse In $[2,+\infty)$ the equation becomes $2x+1=5$ which gives $x=2$ – hamam_Abdallah Jun 11 '17 at 3:14
• Thank you I get it now, thank you. :) – Ayse Jun 11 '17 at 3:20
• If an absolute value is l-x+3l does that come out as (x+3)and if an absolute value is lx+3l does that come out (x+3) ? – Ayse Jun 11 '17 at 6:35

The first derivation is not correct, i.e. $|x-2|+|x+3| = 5 \Rightarrow (x-2)+(x+3)=5$ is wrong. In fact, you should solve the question by arguing case by case according to the value $x$:

1. Case 1, if $x < -3$, we have $(-x+2)+(-x-3)=5$ which implies $x=-3$. Hence there is no solution when $x<-3$.
2. Case 2, if $-3 \leq x \leq 2$, then $(-x+2) + (x+3) =5 \Rightarrow$ x is arbitrary. Therefore, $-3 \leq x \leq 2$ is a solution of the equation.
3. Case 3, if $x > 2$, as case 1, we obtain $(x-2)+(x+3)=5 \Rightarrow x=2$. There is no solution in this case.

In summary, the solution of the equation is $-3 \leq x \leq 2$.

Let $f(x)=|x-2|+|x+3|$.

Since $|.|$ is a convex function and a sum of a convex functions is a convex function,

we see that the equation $f(x)=5$ can have one root or can have two roots or can have infinitely many roots or our equation has no roots.

In our case $2$, $-3$ and $0$ are roots, which gives the answer: $[-3,2]$.