When x is in what range, the absolute value of x minus 1 minus x minus 2 has the maximum value and the maximum value can be obtained

When x is in what range, the absolute value of x minus 1 minus x minus 2 has the maximum value and the maximum value can be obtained


When x ≥ 2, the original formula is 1
When x < 1, the original formula = - 1
When 1 ≤ x < 2, the original formula = 2x-3, judging 2x-3 < 1
When x ≥ 2, the original formula has the maximum value = 1