Find the indefinite integral $\frac{x\sin x}{1+\cos^2 x}$

Solution 1:

I doubt you will be able to evaluate the integral without limits, since this link shows that the integral is very complicated, and has polylogarithms.

With the limits given and using your progress so far, $$\begin{align}\int_0^\pi\frac{x\sin x}{1+\cos^2 x}\,dx&=\left[-x\tan^{-1}(\cos x)\right]_0^\pi+\int_0^\pi\tan^{-1}(\cos x)\,dx\\&=\frac{\pi^2}4-\int_{-\pi/2}^{\pi/2}\tan^{-1}(\sin x)\,dx\end{align}$$The second term is an integral of an odd function on a symmetric interval about $0$. So it is zero. Therefore the answer is $\frac{\pi^2}4$.

Solution 2:

I wrote this in response to the comment by the OP that he/she actually was trying to solve the definite integral over $[0, \pi]$.

Using the fact that

$$\int_{a}^{b} f(x) dx = \int_{a}^{b} f(b + a - x) dx$$

we find

\begin{align} I &= \int_{0}^{\pi} \frac{x \sin x}{1 + \cos^{2}x} dx \\ &= \int_{0}^{\pi} \frac{(\pi - x) \sin(\pi - x)}{1 + \cos^{2}(\pi - x)} dx \\ &= \int_{0}^{\pi} \frac{(\pi - x) \sin x}{1 + \cos^{2}x} dx \\ &= \pi \int_{0}^{\pi} \frac{\sin x}{1 + \cos^{2} x} dx - I \\ \implies I &= \frac{\pi}{2} \int_{0}^{\pi} \frac{\sin x}{1 + \cos^{2}x} dx \qquad \text{(use substitution $u = \cos(x)$ to evaluate)} \\ &= \frac{\pi}{2} \cdot \frac{\pi}{2} \\ &= \frac{\pi^{2}}{4} \end{align}