The minimum value of f(x) = |x−1| +|x−2| + |x−3|
2
To find the minimum value, we will first remove the modulus.
If x ≤ 1,|x−1| = 1 - x,|x−2| = 2 - x and ||x−3| = 3 - x
Similarly, we can split f(x) into the following intervals.
If x ≤ 1, f(x) = 1 - x + 2 - x + 3 - x
= 6 - 3x
Similarly,
f(x) = 3x - 6 if x ≥ 3
= x if 2 ≤ x ≤ 3
= 4 - x if 1 ≤ x ≤ 2
= 6 - 3x if x ≤ 1
We will find the minimum value in each interval and then find the minimum of those values.
if x ≥ 3 f(x) = 3x - 6. The minimum value occurs at x = 3, f(3) = 3
If 2 ≤ x ≤ 3, f(x) = x. Minimum value occurs at x = 2 f(2) = 2
If 1 ≤ x ≤ 2, f(x) = 4-x. Minimum value occurs at x=2 beacuse higher the value of x lesser is the value of the function. So minimum value is 4-2 = 2
If x ≤ 1 , f(x) = 6-3x = minimum value will occur at x = 1 beacuse higher the value of x lesser is the value of the function. So minimum value = 6-3 = 3.
Out of all these minimum values the minimum value = 2