Solve the equation
Locate the breakpoints and split the line. Each modulus changes formula where its inside hits zero, at . These cut the real line into five intervals, and on each one every bar can be removed with a definite sign.
Interpret the equation before computing. The left side is the total distance from to and to ; the right side is the total distance to and to . Since the pair sits entirely to the right of , you should expect the solution somewhere in the middle — and this reading also predicts there will be exactly one.
Handle the three outer intervals. For : gives , a contradiction. For : gives , so , which is not in — rejected. For : , another contradiction.
Handle the interval 0 <= x <= 1. Here , , , :
which lies outside — rejected. Always test the candidate against the interval that produced it; this is where most attempts go wrong.
Handle the interval 1 <= x <= 2. Now , , , :
and does lie in , so it is accepted.
Check the solution in the original equation. At : the left side is and the right side is ✓. So the unique solution is — the midpoint of the two pairs, exactly as the distance reading suggested.
Need to solve a different problem like this? Open the solver →