If \(f(x)=\begin{cases} 1-2x, & x \le 0\\ 1+2x, & x \gt 0 \end{cases}\), then \(\int_{-1}^{1}\displaystyle f(x)\,dx =\)
Answer & explanation
Correct answer: option 4
The correct answer is Option (4) → 4
The rule for f changes at x = 0, so split the integral at 0:
\( \displaystyle \int_{-1}^{1}f(x)\,dx = \int_{-1}^{0}(1-2x)\,dx + \int_{0}^{1}(1+2x)\,dx \)
First part:
\( \displaystyle \int_{-1}^{0}(1-2x)\,dx = \Big[x - x^2\Big]_{-1}^{0} \)
\(= 0 - (-1 - 1) = 2\)
Second part:
\( \displaystyle \int_{0}^{1}(1+2x)\,dx = \Big[x + x^2\Big]_{0}^{1} \)
\(= 2\)
So the integral is 2 + 2 = 4.
The same follows from f(−x) = f(x): f is an even function, so the integral is twice the second part.