How to solve equations containing multiple $|x|$s?

193 Views Asked by At

Suppose I have an equation which looks like:

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

or,

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

How should I solve such problems?

What i do is generally a kind of "hit-and-trial" method but is there an even better method to do so?

Thanks!

1

There are 1 best solutions below

2
On BEST ANSWER

The way that always works (especially for inequalities of the same type, and also for nonlinear stuff in the $| \cdot |$ and for multiple variables) is doing case analysis, such that for each $| \cdot |$ you have 2 cases to look at.

In your first example that would be:

Case 1: $x-2>0$ and $2x+1>0$

Case 2: $x-2>0$ and $2x+1<0$

Case 3: $x-2<0$ and $2x+1>0$

Case 4: $x-2<0$ and $2x+1<0$

it is some work, but often a lot of cases are not important, because they are impossible, such as Case 2 here.