The value of \(\int_{0}^{4}\displaystyle |x - 3|\,dx\) is
Answer & explanation
Correct answer: option 1
The correct answer is Option (1) → \(5\)
The expression \(x - 3\) changes sign at x = 3, so we split the interval there.
For \(0 \le x \le 3\): \(|x - 3| = 3 - x\)
For \(3 \le x \le 4\): \(|x - 3| = x - 3\)
\( \displaystyle \int_{0}^{4} |x - 3|\,dx = \int_{0}^{3}(3 - x)\,dx + \int_{3}^{4}(x - 3)\,dx \)
\( \displaystyle \int_{0}^{3}(3 - x)\,dx = \Big[3x - \frac{x^2}{2}\Big]_{0}^{3} = 9 - \frac{9}{2} = \frac{9}{2} \)
\( \displaystyle \int_{3}^{4}(x - 3)\,dx = \Big[\frac{x^2}{2} - 3x\Big]_{3}^{4} = (8 - 12) - \left(\frac{9}{2} - 9\right) = \frac{1}{2} \)
Adding the two parts:
\( \displaystyle \frac{9}{2} + \frac{1}{2} = 5 \)
Why the other options are incorrect
Option (2) \(4\) — Incorrect. This is the size of \(\int_{0}^{4}(x - 3)\,dx = -4\) with the sign dropped; the modulus must be removed piece by piece, not at the end.
Option (3) \(−4\) — Incorrect. This ignores the modulus: \(\int_{0}^{4}(x - 3)\,dx = 8 - 12 = -4\). An integral of \(|x - 3|\), which is never negative, cannot be negative.
Option (4) \(\displaystyle\frac{9}{2}\) — Incorrect. This is only the part from 0 to 3; the part from 3 to 4, which is \(\frac{1}{2}\), is missing.