# Solving an equation with an absolute value within an absolute value

## Homework Statement

Solve the equation

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

## Homework Equations

$|x| = x$ if $x \geq 0$
$|x| = -x$ if $x < 0$

## The Attempt at a Solution

To start, I have never dealt with such an equation before, and am partly 'iffy' with absolute values in general, but, up until now in my calculus textbook (Calculus A First Course), I have been okay with them.

I would begin to think that there could be four possibilities: the inner absolute value could be greater than or equal to zero in combination with the outer absolute value being greater than or equal to zero, or it could be a combination of greater than or equal to zero and less than zero, the reverse of that, and both being less than zero.

And, there must be a method to see which of the four solved x-values are true.

Supposedly, if there are two absolute values in an equation, one must create the intervals of the domain and see which solved x-values exist in the interval you are solving in.

For example, I would create the following two inequalities and solve for x:

$3x + 1 \geq 0$
$3x \geq -1$
$x \geq -\frac{1}{3}$

$3x + 1 - x \geq 0$
$2x \geq -1$
$x \geq -\frac{1}{2}$

Then, the corresponding 'less than' inequalities would be done.

$3x + 1 < 0$
$3x < -1$
$x < -\frac{1}{3}$

Here, I am not certain as to using $3x + 1$ or $-(3x + 1)$

$3x + 1 - x < 0$
$2x < -1$
$x < -\frac{1}{2}$

So, I now have the domain,

$x < -\frac{1}{3}, -\frac{1}{3} \leq x < -\frac{1}{2}, x \geq -\frac{1}{2}$

Now, I will do cases in each interval, where the nature of the absolute values will be decided by whether they are positive or negative in the interval. And, if the solved x-value exists in the interval, it is a solution.

CASE 1

$x < -\frac{1}{3}$

$3(-2) + 1 < 0$

(Here, I am not sure again to use the positive absolute value or negative.)

$3(-2) + 1 - (-2) < 0$

Therefore,

$-[-(3x + 1) - x] = 2$
$-(-3x - 1 - x) = 2$
$-(-4x - 1) = 2$
$4x + 1 = 2$
$x = \frac{1}{4}$

However, 1/4 does not exist in this interval.

Now, I would continue on, but it strongly appears that with this method I will not get the answers supplied in the textbook. So, any help on how to do this correctly would be much appreciated. (As a note, I was able to solve it and get the correct answers on first try [not through this method], but then I realized I had no way of proving why these two values of the four were correct and the other two were not.)

Much appreciation for any help!

Related Precalculus Mathematics Homework Help News on Phys.org
The absolute value of |x| is defined as x if x>0 and -x if x<0. So if you say 3x+1<0,

|3x+1|= -(3x+1)

|3x+1|-x = + 2

And solving for x in each case. For the general case with inequalities, I would work ina similar fashion.

|3x+1|-x = + 2

And solving for x in each case. For the general case with inequalities, I would work ina similar fashion.
Ah, yes, I forgot about the choice of moving the negative sign.

CASE 1

$3x + 1 < 0$
$|3x + 1| - x \geq 0$

$-(3x + 1) - x = 2$
$-4x - 1 = 2$
$x = -\frac{3}{4}$ --- This is one of the textbook's solutions.

CASE 2

$3x + 1 < 0$
$|3x + 1| - x < 0$

$-(3x + 1) - x = -2$
$-4x - 1 = -2$
$x = \frac{1}{4}$

CASE 3

$3x + 1 \geq 0$
$|3x + 1| - x \geq 0$

$3x + 1 - x = 2$
$2x + 1 = 2$
$x = \frac{1}{2}$ --- This is the other (and last) textbook solution.

CASE 4

$3x + 1 \geq 0$
$|3x + 1| - x < 0$

$3x + 1 - x = -2$
$2x + 1 = -2$
$x = -\frac{3}{2}$

And, I believe I was intended to stop here and await another reply. (Thanks for your help!)

The absolute value of |x| is defined as x if x>0 and -x if x<0. So if you say 3x+1<0,

|3x+1|= -(3x+1)

If I state such, then my answers, that is I think you are referring to the result of the solving of the equation, should include it. For example, if I say such, and then I decide on the inequality for $|3x+1| - x$ as $|3x+1| - x \geq 0$, then that first decision should continue:

$-(3x+1) - x = 2$
$-4x - 1 = 2$
$x = -\frac{3}{4}$

You need to be careful when removing the outermost absolute value sign. If you say (3x+1)>0, then x>-1/3. Then

||3x+1|-x|=|2x+1|

Now 2x+1>0 if x>-1/2. So

|2x+1|=2x+1 if x>-1/2
and
|2x+1|=-(2x+1) if x<-1/2 (but you also have the condition x>-1/3, which is not possible if x<-1/2, so this case is redundant)

So all in all you will have to deal with 4 cases

EDIT: Ooops...I changed a sign there

Last edited:
SammyS
Staff Emeritus
Homework Helper
Gold Member
Once you have your 4 answers, check them in the original expression.

The following was added in the Edit:

Decompose the inner absolute value first.

If 3x+1 ≥ 0 , then ||3x+1|-x| = |3x+1-x| = |2x + 1| .
Now, also notice that 3x+1 ≥ 0 → x ≥ 1/3 → 2x ≥ 2/3 → 2x +1 ≥ 5/3 > 0
What does this imply regarding |2x + 1| ?

Do similarly for 3x+1 < 0 .

Last edited:
You need to be careful when removing the outermost absolute value sign. If you say (3x+1)>0, then x>-1/3. Then

||3x+1|-x|=|2x+1|

Now 2x+1>0 if x>-1/2. So

|2x+1|=2x+1 if x>-1/2
and
|2x+1|=-(2x+1) if x<-1/2 (but you also have the condition x>-1/3, which is not possible if x<-1/2, so this case is redundant)

So all in all you will have to deal with 4 cases

EDIT: Ooops...I changed a sign there
(Thanks!)

Interesting. (The following cases might not correspond to my previous replies.)

CASE 1

$3x + 1 \geq 0 \rightarrow x \geq -\frac{1}{3}$
$||3x + 1| - x| = |2x + 1|$
$2x + 1 \geq 0 \rightarrow x \geq -\frac{1}{2}$
$|2x + 1| = 2 \Leftrightarrow 2x + 1 = 2 \Leftrightarrow x = \frac{1}{2}$ if dom $= \left\{x| x \geq -\frac{1}{3}\right\}$, which is true (this x-value does belong in this domain)

CASE 2

$3x + 1 \geq 0 \rightarrow x \geq -\frac{1}{3}$
$||3x + 1| - x| = |2x + 1|$
$2x + 1 < 0 \rightarrow x < -\frac{1}{2}$
$|2x + 1| = 2 \Leftrightarrow 2x + 1 = -2 \Leftrightarrow x = -\frac{3}{2}$ if dom $= \left\{x| -\frac{1}{3} \leq x < -\frac{1}{2} \right\}$, which is false (this x-value does not belong in this domain)

CASE 3

$3x + 1 < 0 \rightarrow x < -\frac{1}{3}$
$||3x + 1| - x| = |-4x - 1|$
$-4x - 1 \geq 0 \rightarrow x \leq -\frac{1}{4}$
$|-4x - 1| = 2 \Leftrightarrow -4x - 1 = 2 \Leftrightarrow x = -\frac{3}{4}$ if dom $= \left\{ x| x < -\frac{1}{3} \right\}$, which is true

CASE 4

$3x + 1 < 0 \rightarrow x < -\frac{1}{3}$
$||3x + 1| - x| = |-4x - 1|$
$-4x - 1 < 0 \rightarrow x > -\frac{1}{4}$
$|-4x - 1| = 2 \Leftrightarrow -4x - 1 = -2 \Leftrightarrow x = \frac{1}{4}$ if dom $= \left\{ x| -\frac{1}{4} < x < -\frac{1}{3} \right\}$, which is false

Therefore! The solutions are $x = -\frac{3}{4}, \frac{1}{2}$. Oooooo! I think I did this correctly! =D.

But, about your statement of redundancy, wouldn't $x < -\frac{1}{2}$ be true if $x \geq -\frac{1}{3}$, that is that the interval $-\frac{1}{3} \leq x < -\frac{1}{2}$ would be true?

Are you sure about the domain of your second case? Look at the number line; (1/2)>(1/3) so (-1/2)<(-1/3). So the conditions x<(-1/2) and x>(-1/3) cannot be met at the same time. You don't need to consider such a case because the conditions for x are not possible.

Ray Vickson
Homework Helper
Dearly Missed
I am a great fan of plotting in cases like this one, as a graph gives you a lot of insight (although, of course, it can only be used easily for a single variable, x). What does the graph y = f(x) [f(x) = ||3x+1|-x| look like. Consider first the plot of |3x+1|; this will be "V" shaped, with a minimum of 1 at x = -1/3, and a slope of +3 to the right of the minimum and a slope of -3 to the left. Now subtract x: |3x+1|-x has a slopt of +2 to the right of x = -1/3 and a slope of -4 to the left of x = -1/3. At the point x = 0 it coincides with the graph of |3x+1|. So, you can easily plot |3x+1| - x. Now you want to look at the absolute value of the above, so if the plot goes negative you change the sign, but where it is positive you do nothing. Then you want to find the points on the final plot where y = 2.

RGV

Are you sure about the domain of your second case? Look at the number line; (1/2)>(1/3) so (-1/2)<(-1/3). So the conditions x<(-1/2) and x>(-1/3) cannot be met at the same time. You don't need to consider such a case because the conditions for x are not possible.
Oh, hahaha! Yes, I understand now -- I was indeed thinking of $-\frac{1}{3}$ as being less than $-\frac{1}{2}$, while the reverse is actually true.

Once you have your 4 answers, check them in the original expression.

The following was added in the Edit:

Decompose the inner absolute value first.

If 3x+1 ≥ 0 , then ||3x+1|-x| = |3x+1-x| = |2x + 1| .
Now, also notice that 3x+1 ≥ 0 → x ≥ 1/3 → 2x ≥ 2/3 → 2x +1 ≥ 5/3 > 0
What does this imply regarding |2x + 1| ?

Do similarly for 3x+1 < 0 .

But, I think Pi-Bond has got me through it, and my revised solution is a reply to one of Pi-Bond's comments.

I am a great fan of plotting in cases like this one, as a graph gives you a lot of insight (although, of course, it can only be used easily for a single variable, x). What does the graph y = f(x) [f(x) = ||3x+1|-x| look like. Consider first the plot of |3x+1|; this will be "V" shaped, with a minimum of 1 at x = -1/3, and a slope of +3 to the right of the minimum and a slope of -3 to the left. Now subtract x: |3x+1|-x has a slopt of +2 to the right of x = -1/3 and a slope of -4 to the left of x = -1/3. At the point x = 0 it coincides with the graph of |3x+1|. So, you can easily plot |3x+1| - x. Now you want to look at the absolute value of the above, so if the plot goes negative you change the sign, but where it is positive you do nothing. Then you want to find the points on the final plot where y = 2.

RGV

I do also agree that graphing problems when possible is a great way of understanding it.

SammyS
Staff Emeritus