The value of definite integral $\int_{-\pi}^{\pi} \frac{2x(1+\sin x)}{1+\cos^2 x} dx$ is:
Step-by-Step Solution
$\textcolor{green}{\textbf{Key Idea}}$
Split the integrand:
\[
\frac{2x(1+\sin x)}{1+\cos^2x}
=\frac{2x}{1+\cos^2x}
+\frac{2x\sin x}{1+\cos^2x}.
\]
The first term is odd and integrates to \(0\) over \([-\pi,\pi]\). The second term is even. Then use the symmetry
\[
f(\pi-x)=f(x)
\]
for
\[
f(x)=\frac{\sin x}{1+\cos^2x}
\]
on \([0,\pi]\).
$\textcolor{blue}{\textbf{Solution}}$
Let
\[
I=\int_{-\pi}^{\pi}
\frac{2x(1+\sin x)}{1+\cos^2 x}\,dx.
\]
Split it as
\[
I=\int_{-\pi}^{\pi}\frac{2x}{1+\cos^2x}\,dx
+\int_{-\pi}^{\pi}\frac{2x\sin x}{1+\cos^2x}\,dx.
\]
The first integrand is odd, so its integral is \(0\). The second integrand is even, so
\[
I=4\int_0^\pi \frac{x\sin x}{1+\cos^2x}\,dx.
\]
Let
\[
J=\int_0^\pi \frac{x\sin x}{1+\cos^2x}\,dx.
\]
Since
\[
\frac{\sin(\pi-x)}{1+\cos^2(\pi-x)}
=\frac{\sin x}{1+\cos^2x},
\]
we use the symmetry formula:
\[
J=\frac{\pi}{2}\int_0^\pi
\frac{\sin x}{1+\cos^2x}\,dx.
\]
Now put
\[
u=\cos x,\qquad du=-\sin x\,dx.
\]
Then
\[
\int_0^\pi
\frac{\sin x}{1+\cos^2x}\,dx
=\int_{-1}^{1}\frac{du}{1+u^2}
=\left[\tan^{-1}u\right]_{-1}^{1}
=\frac{\pi}{2}.
\]
Thus
\[
J=\frac{\pi}{2}\cdot \frac{\pi}{2}
=\frac{\pi^2}{4}.
\]
Therefore
\[
I=4J=\pi^2.
\]
\[
\boxed{\pi^2}
\]
$\textcolor{red}{\textbf{Key Trap}}$
Do not declare the whole integrand odd because of the factor \(x\). The factor \(1+\sin x\) breaks that. Only
\[
\frac{2x}{1+\cos^2x}
\]
is odd. The term
\[
\frac{2x\sin x}{1+\cos^2x}
\]
is even and contributes the full answer.
Correct Answer: 3