Let \( f(x)=|x-1|+|x-2|,\ x\in R \). Then which of the following statements is/are TRUE?
(A) \( f \) is continuous everywhere.
(B) \( f \) is continuous everywhere except at \( x=1 \) and \( x=2 \)
(C) \( f \) is not differentiable at \( x=1 \) and \( x=2 \)
(D) \( f \) is differentiable at \( x=1 \) and \( x=2 \)
Choose the correct answer from the options given below:
Answer & explanation
Correct answer: option 3
The correct answer is Option (3) → (A) and (C) only
Removing the modulus signs on each interval,
\( \displaystyle f(x)=\begin{cases}3-2x,&x\lt1\\ 1,&1\le x\le2\\ 2x-3,&x\gt2\end{cases} \)
At x = 1 and x = 2 the neighbouring pieces have the same value 1, so f is continuous there; each piece is continuous elsewhere.
The one-sided derivatives are the slopes of the pieces:
\( f'(1^{-})=-2,\ f'(1^{+})=0 \)
\( f'(2^{-})=0,\ f'(2^{+})=2 \)
So f is continuous everywhere, and its left and right derivatives differ at x = 1 (−2 and 0) and at x = 2 (0 and 2).
Checking the statements
(A) \( f \) is continuous everywhere. — Correct. The pieces join with value 1 at x = 1 and at x = 2.
(B) \( f \) is continuous everywhere except at \( x=1 \) and \( x=2 \) — Incorrect. f is continuous at both points.
(C) \( f \) is not differentiable at \( x=1 \) and \( x=2 \) — Correct. The one-sided derivatives are −2, 0 at x = 1 and 0, 2 at x = 2.
(D) \( f \) is differentiable at \( x=1 \) and \( x=2 \) — Incorrect. The one-sided derivatives differ at both points.