TITLE: Integrate $\frac{\theta \sin \theta}{1+\cos^2 \theta}$ with respect to $\theta$
QUESTION [5 upvotes]: Integrate :
$$\int_0^\pi \frac{\theta \sin \theta}{1+\cos^2 \theta} d\theta$$
I tried to do a substitution by letting : $u=\cos \theta \implies  du=-\sin\theta\ d\theta$
But I have a problem with that $\theta$, I don't know how to get bogged down in this variable, I tried some simplifications, but it gets complicated, here's what I've done :
\begin{align}
\frac{\theta \sin \theta}{1+\cos^2 \theta}&=\frac{\theta \sin\theta}{1+\frac{1+\cos 2\theta}{2}}\\
&=\frac{2\theta \sin \theta}{3+\cos 2\theta}\\
&=\frac{\theta 2\sin \theta \cos\theta}{\cos\theta(3+\cos 2\theta)}\\
&=\frac{\theta \sin 2\theta}{\cos\theta(3+\cos 2\theta)}
\end{align}
Any hints ? Thanks in advance !

REPLY [5 votes]: Alternatively, just do a simple integration by parts with $u=\theta$ and $dv=\frac{\sin{\theta} d\theta}{1+\cos^2{\theta}}$:
$$\int_0^\pi \frac{\theta \sin \theta}{1+\cos^2 \theta} d\theta= -\theta \arctan{\left(\cos {\theta}\right)}\bigg \rvert_0^{\pi}+\int_0^{\pi}  \arctan{\left(\cos {\theta}\right)} d\theta$$
For the second integral, notice that it is odd about $\theta=\frac{\pi}{2}$ or if you don't see that then $\theta \mapsto \theta-\frac{\pi}{2}$
$$=\frac{\pi^2}{4} + \require{cancel} \cancel{\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \arctan{\left(\sin{\theta}\right)} d \theta}$$
$$=\boxed{\frac{\pi^2}{4}}$$
Edit: I got $\arctan{\left(\cos{\theta}\right)}$ by substituting $u=\cos{\theta}$ for the $dv$ expression.  The $\sin{\theta}$ cancels from the $du$ expression and it's just a straightforward $\arctan{u}$ integral.  As Barry Chipa said in the comments, the second integral is odd (substitute $\xi=-\theta$ to see this (remember that both $\sin{\theta}$ and $\arctan{\theta}$ are odd functions.