If \(f(x) = |x|+|x-5|\), then which of the following statements are TRUE?
(A) f is a continuous function everywhere
(B) f is a continuous function except x = 5 and x = 0
(C) f is a continuous function except x = 0 but not differentiable at x = 5
(D) f is a continuous function everywhere but not differentiable at x = 0 and x = 5
Choose the correct answer from the options given below:
Answer & explanation
Correct answer: option 3
The correct answer is Option (3) → (A) and (D) only
Removing the moduli on each interval:
\(\displaystyle f(x) = \begin{cases} 5 - 2x, & x \lt 0 \\ 5, & 0 \le x \le 5 \\ 2x - 5, & x \gt 5 \end{cases}\)
Each piece is a polynomial, so f is continuous away from 0 and 5. At the joining points the pieces agree:
\(\text{At } x = 0:\ 5 - 2(0) = 5 = f(0)\)
\(\text{At } x = 5:\ 2(5) - 5 = 5 = f(5)\)
So f is continuous everywhere (as a sum of two continuous functions it must be). For differentiability, compare the slopes of the pieces on the two sides:
\(\text{At } x = 0:\ \text{LHD} = -2,\ \text{RHD} = 0\)
\(\text{At } x = 5:\ \text{LHD} = 0,\ \text{RHD} = 2\)
So f is continuous everywhere, and not differentiable at x = 0 and x = 5.
Checking the statements
(A) f is a continuous function everywhere — Correct. Both pieces meet at x = 0 and x = 5 with value 5.
(B) f is a continuous function except x = 5 and x = 0 — Incorrect. f is continuous at 0 and 5 too, with f(0) = f(5) = 5.
(C) f is a continuous function except x = 0 but not differentiable at x = 5 — Incorrect. f is continuous at x = 0 (the left and right values are both 5).
(D) f is a continuous function everywhere but not differentiable at x = 0 and x = 5 — Correct. The one-sided derivatives are −2, 0 at x = 0 and 0, 2 at x = 5.