Integrate $\frac{\theta \sin \theta}{1+\cos^2 \theta}$ with respect to $\theta$ 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 !
 A: Here's a trick which I use always with integrals involving trigonometric functions :
$$\int_\alpha^\beta \varphi (\xi) d\xi=\int_\alpha^\beta \varphi (\alpha +\beta-\xi) d\xi$$
The proof is trivial and left for you as an exercise, lol!
Anyway, applying this technique to this integral :
Let $$I=\int_0^\pi \frac{x\sin x}{1+\cos^2x}dx$$
We'll have after applying this formula :
\begin{align}
I&=\int_0^\pi \frac{(\pi-x)\sin (\pi-x)}{1+\cos^2(\pi-x)} dx\\
2I&=\int_0^\pi \frac{x\sin x}{1+\cos^2x} + \frac{(\pi-x)\sin (\pi-x)}{1+\cos^2(\pi-x)}dx\\
I&=\frac{1}2\int_0^\pi \frac{x \sin x+\pi \sin x-x\sin x}{1+\cos^2x}\\
&=\frac{1}2\int_0^\pi \frac{\pi \sin x}{1+\cos^2x}\\
&=\frac{\pi}2\int_0^\pi \frac{ \sin x}{1+\cos^2x}
\end{align}
Now using the substitution you did earlier
$$ u=\cos x \Leftrightarrow du=-\sin x$$
So ;
\begin{align}
I&=\frac{\pi}2\int_1^{-1} \frac{-du}{1+u^2}\\
&=\frac{\pi}2\int_{-1}^{1} \frac{du}{1+u^2}\\
&=\frac{\pi}2 \arctan u\bigg\vert_{-1}^1\\
&=\frac{\pi}2 \bigg(\frac{\pi}4 +\frac{\pi}4\bigg)\\
&=\frac{\pi^2}{4}
\end{align}
Hence as @PeterForeman said your integral is : $\displaystyle \frac{\pi^2}{4}$
By the way, if you want the proof of the formula, all that you have to do is :
$$\xi=\alpha +\beta-u \Leftrightarrow d\xi=-du$$
Therefore;
$$\int_\beta^\alpha \varphi (\alpha+\beta-u) (-du)=\int_\alpha^\beta \varphi (\alpha +\beta-\xi) d\xi$$
A: Another really cool way of getting the answer is from infinite series!!!!
Notice that
$${\frac{1}{1+\cos^2(x)}=\sum_{n=0}^{\infty}\left(-\cos^2(x)\right)^n}$$
And so
$${\int_{0}^{\pi}\frac{x\sin(x)}{1+\cos^2(x)}dx=\int_{0}^{\pi}x\sin(x)\sum_{n=0}^{\infty}\left(-\cos^2(x)\right)^ndx}$$
After interchanging a few things around, the integral becomes
$${=\sum_{n=0}^{\infty}(-1)^n\int_{0}^{\pi}x\sin(x)\cos^{2n}(x)dx}$$
If we use integration by parts on the inner integral, with ${dv=\sin(x)\cos^{2n}(x)dx}$ and ${u=x}$ you end up with
$${\int_{0}^{\pi}(-1)^nx\sin(x)\cos^{2n}(x)dx=(-1)^n\left(\left(x\frac{-\cos^{2n+1}(x)}{2n+1}\right)_{x=0}^{x=\pi} + \frac{1}{2n+1}\int_{0}^{\pi}\cos^{2n+1}(x)dx\right)}$$
The rightmost integral will always be zero, and so we just end up with
$${=\frac{(-1)^n\pi}{2n+1}}$$
Hence overall
$${\int_{0}^{\pi}\frac{x\sin(x)}{1+\cos^2(x)}dx=\pi \sum_{n=0}^{\infty}\frac{(-1)^n}{2n+1}}$$
The infinite sum is just the Leibniz infinite series for ${\frac{\pi}{4}}$. So
$${=\pi\frac{\pi}{4}=\frac{\pi^2}{4}}$$
A: 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.
A: $$I=\int_0^\pi \frac{\theta \sin \theta}{1+\cos^2 \theta} d\theta\tag 1$$
Using property of definite integral: $\int_a^bf(x)dx=\int_a^bf(a+b-x)dx$,
$$I=\int_0^\pi \frac{(\pi-\theta) \sin \theta}{1+\cos^2 \theta} d\theta\tag 2$$
Adding (1) and (2),
$$2I=\int_0^\pi \frac{\pi \sin \theta}{1+\cos^2 \theta} d\theta$$
$$I=\frac{\pi}{2}\int_0^{\pi} \frac{ \sin \theta \ d\theta}{1+\cos^2 \theta} $$
$$I=- \pi\int_0^{\pi/2} \frac{ d(\cos \theta)}{1+\cos^2 \theta} $$
$$I=-\pi\left[\tan^{-1}\left(\cos\theta\right)\right]_0^{\pi/2}$$
$$=\frac{\pi^2}{4}$$
