# Equation of first grade with absolute value

I have this statement:

I) The equation: $|x - 5 | = 1$

I want to solve the equation, but I have a question.

When I have the absolute value of an incognita and a number, $| x - 5 |$.

How do I proceed ? Should I eliminate the absolute value as a parenthesis, without changing signs? like: $x - 5 = 1$

Or I should leave it as: $x + 5 = 1$ ( changing all signs to positive )

• Use that $|a|=b \ge 0 \iff a = \pm b\,$. – dxiv Mar 10 '18 at 21:18

## 4 Answers

Remember: $$|x| = \begin{cases} x, & \text{if } x \ge 0\\[0.2cm] -x, & \text{if } x < 0 \end{cases}$$

This is true more generally also, not just for $|x|$ but for things like $|x-5|$: $$|x-5| = \begin{cases} x - 5, & \text{if } x-5 \ge 0 \\[0.2cm] -(x-5), & \text{if } x - 5 < 0 \end{cases}$$

This is why the equation $|x-5| = 1$ gets broken up into $x-5 = 1$ and $-(x-5) = 1$. Then both of these equations are solved individually.

• Perfect and clear, many thanks – Mattiu Mar 10 '18 at 21:27

there are two cases: $$x-5=1$$ or $$-(x-5)=1$$

• Thanks Sonnhard – Mattiu Mar 10 '18 at 21:22

Here is a slightly more complex way, if you are having trouble with the positive/negative, and want to completely avoid any cases.

In my opinion, it is also beneficial in equations like these:

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

In your question, square both sides to get rid of the absolute value.

$$|x-5|^2=1 \implies x^2-10x+25=1 \implies x^2-10x+24=0 \implies(x-12)(x+2)=0$$

From which you get the solutions $x=12, -2$.

You just have to remember that, for any $b\ge 0$, $$|x-a|=b\iff x-a=\pm b\iff x=a\pm b,$$ and similarly, for inequalities, $$|x-a| < b\iff -b < x-a < b\iff a-b < x < a+b.$$