The value of \( \int_{-\pi/2}^{\pi/2}\displaystyle(\sin|x|+\cos|x|)dx \) equals:
Answer & explanation
Correct answer: option 4
The correct answer is Option (4) → 4
Since \( |-x|=|x| \), the integrand is an even function, so
\( \displaystyle \int_{-a}^{a}f(x)\,dx=2\int_{0}^{a}f(x)\,dx \)
For x ≥ 0, |x| = x:
\( \displaystyle 2\int_{0}^{\pi/2}(\sin x+\cos x)\,dx=2\Big[-\cos x+\sin x\Big]_{0}^{\pi/2} \)
\( \displaystyle =2\big[(0+1)-(-1+0)\big] \)
\( \displaystyle =2(2) \)
\( \displaystyle =4 \)
Tip: sin|x| is even, while sin x is odd. Treating sin|x| as sin x makes its part cancel over the symmetric interval and gives 2, Option (2).