Question:hard

The integral \( \int_{0}^{\pi} |x \cos 2x| dx \) is equal to:

Show Hint

For integrals of \( |f(x)| \), determine the sign of \( f(x) \) in every sub-interval to remove the modulus correctly[cite: 1017].
Updated On: Jun 9, 2026
  • \( \pi \)
  • \( \pi - 2 \)
  • \( \pi + \frac{1}{4} \)
  • \( \pi - \frac{1}{4} \)
Show Solution

The Correct Option is C

Solution and Explanation

Step 1: Understand the modulus.
Since $x \ge 0$ on $[0,\pi]$, the sign of $x\cos 2x$ is decided entirely by $\cos 2x$. So $|x\cos 2x|$ flips sign exactly where $\cos 2x$ changes sign.
Step 2: Find where $\cos 2x = 0$.
On $[0,\pi]$, $\cos 2x = 0$ when $2x = \frac{\pi}{2}$ or $\frac{3\pi}{2}$, i.e. at $x = \frac{\pi}{4}$ and $x = \frac{3\pi}{4}$. Between these, $\cos 2x$ is negative; outside, it is positive.
Step 3: Break the integral into three pieces.
\[ I = \int_0^{\pi/4} x\cos 2x\,dx - \int_{\pi/4}^{3\pi/4} x\cos 2x\,dx + \int_{3\pi/4}^{\pi} x\cos 2x\,dx \] the middle piece getting a minus sign because the function is negative there.
Step 4: Find the antiderivative by parts.
Integrating by parts, $\int x\cos 2x\,dx = \frac{x}{2}\sin 2x + \frac{1}{4}\cos 2x$. We will plug limits into this single formula.
Step 5: Evaluate each piece.
First piece $[0,\frac{\pi}{4}]$: $\left(\frac{\pi}{8}\right) - \left(\frac{1}{4}\right) = \frac{\pi}{8}-\frac{1}{4}$. Middle piece $[\frac{\pi}{4},\frac{3\pi}{4}]$: $\left(-\frac{3\pi}{8}-\frac{1}{4}\right)-\left(\frac{\pi}{8}-\frac{1}{4}\right) = -\frac{\pi}{2}$. Last piece $[\frac{3\pi}{4},\pi]$: $\left(\frac{1}{4}\right)-\left(-\frac{3\pi}{8}-\frac{1}{4}\right) = \frac{3\pi}{8}+\frac{1}{2}$.
Step 6: Combine with the correct signs.
\[ I = \left(\frac{\pi}{8}-\frac{1}{4}\right) - \left(-\frac{\pi}{2}\right) + \left(\frac{3\pi}{8}+\frac{1}{2}\right) = \pi + \frac{1}{4} \]
\[ \boxed{\pi + \dfrac{1}{4}} \]
Was this answer helpful?
0