The value of the integral \(I=\int_{-1}^{2}\displaystyle|x|\,dx\) is:
Answer & explanation
Correct answer: option 3
The correct answer is Option (3) → \(\displaystyle\frac{5}{2}\)
|x| = −x for x ≤ 0 and |x| = x for x ≥ 0, so the integral is split at x = 0:
\( \displaystyle I = \int_{-1}^{0}(-x)\,dx + \int_{0}^{2}x\,dx \)
\( \displaystyle = \left[-\frac{x^2}{2}\right]_{-1}^{0} + \left[\frac{x^2}{2}\right]_{0}^{2} \)
\( \displaystyle = \left(0 + \frac{1}{2}\right) + \left(2 - 0\right) \)
\( \displaystyle = \frac{5}{2} \)
Why the other options are incorrect
Option (1) 0 — Incorrect. |x| is never negative and is positive except at x = 0, so its integral over [−1, 2] is positive.
Option (2) \(\displaystyle\frac{1}{2}\) — Incorrect. This is only the part from −1 to 0.
Option (4) \(\displaystyle\frac{3}{2}\) — Incorrect. This is \(\int_{-1}^{2}x\,dx = \frac{4}{2} - \frac{1}{2}\), which ignores the modulus and lets the part on [−1, 0] count as negative.