The function given by \(f(x)=|x-1|+|x-2|+|x-3|\) is :
Answer & explanation
Correct answer: option 3
The correct answer is Option (3) → Continuous but not differentiable at x = 1, 2 and 3
Each \(|x-a|\) is continuous everywhere, so their sum f is continuous for all x.
Removing the modulus signs on each interval:
\(x\lt 1\): \(f(x)=(1-x)+(2-x)+(3-x)=6-3x\), slope −3
\(1\lt x\lt 2\): \(f(x)=(x-1)+(2-x)+(3-x)=4-x\), slope −1
\(2\lt x\lt 3\): \(f(x)=(x-1)+(x-2)+(3-x)=x\), slope 1
\(x\gt 3\): \(f(x)=3x-6\), slope 3
At x = 1, 2 and 3 the left-hand and right-hand derivatives differ (−3 and −1, −1 and 1, 1 and 3). So f is not differentiable at these three points, and differentiable everywhere else.
Option (4) is impossible in any case: a function that is differentiable at a point is always continuous there.