Question:medium

Evaluate :

\[ I = \int_{-\pi}^{\pi} \frac{2x\,(1+\sin x)}{1+\cos^2 x}\,dx \]

Show Hint

Split the numerator into an odd part and an even part, drop the odd part, and use the property \(\int_0^{\pi} f(x)\,dx = \int_0^{\pi} f(\pi - x)\,dx\) on what remains.
Updated On: Oct 22, 2026
Show Solution

Solution and Explanation

Step 1: Remove the odd part:
Break the numerator as $2x(1+\sin x) = 2x + 2x\sin x$.
The term $\frac{2x}{1+\cos^2 x}$ is an odd function, and it is integrated over the symmetric interval $[-\pi, \pi]$. Its integral is $0$.
The term $\frac{2x\sin x}{1+\cos^2 x}$ is even, so we may double the integral over $[0, \pi]$.
\[ I = 4\int_0^{\pi}\frac{x\sin x}{1+\cos^2 x}\,dx \]

Step 2: Choose integration by parts:
Take $u = x$ and $dv = \frac{\sin x}{1+\cos^2 x}\,dx$.
To find $v$, put $t = \cos x$. Then $\int \frac{\sin x}{1+\cos^2 x}\,dx = -\int\frac{dt}{1+t^2} = -\tan^{-1}(\cos x)$.
So $v = -\tan^{-1}(\cos x)$.

Step 3: Apply the by-parts formula:
\[ \int_0^{\pi}\frac{x\sin x}{1+\cos^2 x}\,dx = \Big[-x\tan^{-1}(\cos x)\Big]_0^{\pi} + \int_0^{\pi}\tan^{-1}(\cos x)\,dx \]

Step 4: Evaluate the boundary term:
At $x = \pi$: $-\pi\tan^{-1}(-1) = -\pi\left(-\frac{\pi}{4}\right) = \frac{\pi^2}{4}$.
At $x = 0$: $-0 \cdot \tan^{-1}(1) = 0$.
So the boundary term equals $\frac{\pi^2}{4}$.

Step 5: Show the last integral is zero:
Let $K = \int_0^{\pi}\tan^{-1}(\cos x)\,dx$. Replace $x$ by $\pi - x$. Since $\cos(\pi - x) = -\cos x$ and $\tan^{-1}$ is odd, $K = -K$.
So $K = 0$.

Step 6: Combine:
\[ \int_0^{\pi}\frac{x\sin x}{1+\cos^2 x}\,dx = \frac{\pi^2}{4} + 0 = \frac{\pi^2}{4} \]
\[ I = 4 \times \frac{\pi^2}{4} = \pi^2 \]

Final Answer:
The integral equals $\pi^2$. \[ \boxed{\pi^2} \]
Was this answer helpful?
0