# Logic for solving absolute value equalities

For absolute value equalities, say $|x-a|=b$, my approach is :
There are two cases, based on which the sign of the absolute value is taken.
Case 1: If $x-a\ge b$, then $x-a\ge 0$; so for given interval $x\ge a+b$, $x = a+b$.
Case 2: If $x-a\lt b$ then $x-a\lt 0$; so for given interval $x\lt a+b$, $x = a-b$.

But, have two posts on mse that contradict.
One is an answer to my post, and other is here.
For the first example, have reverse inclusion, i.e. left end is excluded; while the right end is included. This has yielded an extra solution point. However, substitution of the extra solution $x=2$ yields a correct value on substitution back, as follows:
$|x+1|-|x|+3|x-1|-2|x-2|= x+2$
$3-2+3= 4$
$4=4$, which is correct.
It is logical too, as in the next interval all of the points on real axis for which $x\ge 2$ are valid.
But, still it is a logical error as per me.

The other post, has error (as per me) in the second case where both left and right end are included.

Thanks to @SiongThyeGoh for pointing out errors in my solution construction.
Have not specified (i) $b\ge 0$,
(ii) Should specify for the two cases instead as :
Case 1: If $x-a\ge 0$, then $x-a=b\implies x = a+b$,
Case 2: If $x-a\lt 0$, then $x-a=-b\implies x = a-b$,

For $|x-a|=b$ to have a solution, we need $b$ to be nonnegative and

$$|x-a|=b$$

the distance of $x$ from $a$ is $b$.

Hence, $$x=a \pm b.$$

Note that if $b<0$ then there is no solution.

Altenatively:

• Consider $x \ge a$ and $x < a$.

• If $x \ge a$, then $|x-a|=b$ becomes $x-a=b$ and we have $x=a+b$ which is at least as big as $a$ if $b \ge 0$.

• If $x < a$, then $|x-a|=b$ becomes $a-x=b$ and we have $x=a-b$ which is a solution if $b>0$.

• You have to mention that there is no solution if $b<0$.
• Case $1$, If $x-a \ge b$, since $b \ge 0$, we then have $x-a \ge 0$, and hence $x-a=b$ and $x=a+b$.
• Case $2$, if $x-a < b$, then $x-a=-b$, hence $x=a-b$. While $x<a+b$ is a true statement, it is not as clear to me how do you conclude $x=a-b$.(it is a true statement but your phrasing makes me uncertain whether you get the concept).
• I am having two intervals based on the boundary point $x= a+b$ : (i) $x\lt a+b$, (ii) $x\ge a+b$. ( (i) refers to Case 2 of your answer, while (ii) refers to Case 1). Till now, $x$ denotes value on real number line. The next part is the final equality achieved, which for (i) $x=a-b$, while for (ii) $x=a+b$. Although, am not sure how to interpret the two values of $x$ obtained, should I say that as for (i) the interval was $x\lt a+b$, so the value of $x=a-b$ is correct; and for (ii) $x\ge a+b$, the result $x=a+b$ is also valid. – jiten Jun 3 '18 at 5:22