Solve the inequality
Find the kink points and split the line. Each absolute value changes formula where its inside vanishes: at and . So consider , , and ; on each piece both absolute values become linear.
Case 1: x < 2 (both insides negative). Then and , so the sum is :
Dividing by flips the inequality. Intersecting with leaves .
Case 2: 2 <= x < 5 (mixed signs). Here and , and the terms cancel:
False for every in the interval, so the middle strip contributes nothing. The sum is constant at between the kinks — the distance from to .
Case 3: x >= 5 (both insides non-negative). The sum is :
Intersecting with leaves .
Union the cases.
Confirm with the distance reading. is the total distance from to and to . Its minimum is the gap , attained on all of ; outside, it grows by per unit. To reach requires an extra , i.e. units beyond a kink — putting the boundaries at and ✓. Checking: at and at , both excluded by the strict inequality. A scan of exact rational points on agrees at every point ✓.
Need to solve a different problem like this? Open the solver →