# Sum of two absolute values equal to a whole number

The following is the equation:

$$|x+1|+|x+2|=3$$

How can I solve this problem?

Do I have to reformat it to $$|x+1|=3-|x-2|$$?

I would like a simple answer that by no means uses set theory. The answer must include a step by step explanation

• You say not to use set theory, but bear in mind, this equation does not have one or two solutions. There will be a whole interval of solutions. It's best to express these solutions as a set, but we can also express it with an inequality if you prefer. Just a heads up. – Theo Bendit Apr 8 at 23:09
• But we can express these also with multiple inequalities @TheoBendit – BeastCoder2 Apr 8 at 23:10
• Yes, that's true (and I did mention this in my comment). I was trying to confirm that you were just objecting to expressing the solution as a set, not trying to deny the fact that there is an infinite set of solutions. – Theo Bendit Apr 8 at 23:12
• @TheoBendit Oh, sorry! Didn't see that in your comment, but yea, like you said I want to just use inequalities – BeastCoder2 Apr 8 at 23:13
• Did you mean $3-|x\color{red}{+}2|$ ? – J. W. Tanner Apr 8 at 23:51

You have three cases to look at:

• Case 1: $$x<-1$$

• Case 2: $$-1\le x<2$$

• Case 3: $$x\ge 2$$

• @HANDMINSOUMARE Could you please give an explanation as to how you got those cases – BeastCoder2 Apr 8 at 23:07
• Look at the roots of $x+1$ and $x-2$. – HAMIDINE SOUMARE Apr 8 at 23:10

The first term $$|x+1|$$ is the distance from $$x$$ to $$-1$$, and the second term $$|x-2|$$ is the distance from $$x$$ to $$2$$. Now, considering that the points $$-1$$ and $$2$$ lie precisely $$3$$ steps apart on the number line, can you deduce where on the the number line $$x$$ must lie in order for the sum of those two distances to be $$3$$?

Case 1: $$x+1+x+2=3$$ >> $$x=0$$

Case 2: $$-(x+1)+x+2=3$$ >> No Solutions

Case 3: $$x+1-(x+2)=3$$ >> No Solutions

Case 4: $$-(x+1)-(x+2)=3$$ >> $$x=-3$$

Therefore the two answers are: $$x=0$$ and $$x=-3$$

• You seem to have mixed up $x - 2$ and $x + 2$ here. – Theo Bendit Apr 8 at 23:26
• @TheoBendit I fixed it! – BeastCoder2 Apr 8 at 23:33
• Oh, so it was the original question that was wrong? The answerers will not be pleased. :-( – Theo Bendit Apr 8 at 23:44
• You should also check the feasibility of your solutions by plugging them back into the original equation. Some solutions can be false in such circumstances. – Theo Bendit Apr 8 at 23:46

You asked for solutions to $$|x+1|+|x+2|=3.$$

If $$x<-2$$ then $$x+1$$ and $$x+2 <0$$, so this means $$-(x+1)-(x+2)=3,$$ i.e., $$x=-3.$$

If $$x\ge-1$$ then $$x+1$$ and $$x+2 \ge 0$$, so this means $$(x+1)+(x+2)=3,$$ i.e., $$x=0$$.

If $$-2\le x<-1$$ then $$x+1<0$$ but $$x+2\ge0$$, so $$-(x+1)+(x+2)=3$$,

which has no solution.

Hint: if $$x+1 > 0$$ , $$x+1 < 0$$, $$x+1 = 0$$ and $$x-2 > 0$$, $$x - 2 < 0$$, $$x-2 = 0$$, etc...There are $$9$$ possibilities all together.

• How did you get those? – BeastCoder2 Apr 8 at 23:08