# Evaluate $\int_0^{\pi}\frac{x\sin x}{1+\cos^2x}\,\mathrm dx$

I can't seem to get any kind of result which I find useful when I use the fact that $$\int_0^af(x)\,\mathrm dx=\int_0^af(a-x)\,\mathrm dx$$

After using trigonometry, I end up getting: $$\int_0^{\pi}\frac{(\pi-x)\sin x}{1+\cos^2x}\,\mathrm dx$$

• hint: add both the integral in the body of your post and the one in the title. – abel Dec 13 '14 at 0:23

It follows from what you've done so far that

$$2 \int_0^\pi \frac{x \sin x}{1+\cos^2 x} dx = \int_0^\pi \frac{\pi\sin x}{1+\cos^2 x} dx$$

The integral on the left is twice the one you're after. The integral on the right can be evaluated using the 'obvious' substitution of $u = \cos x$ and then hopefully you recognize the integral.

Added (in response to comment below)

You have shown that

$$\int_0^\pi \frac{x \sin x}{1+\cos^2 x} dx = \int_0^\pi \frac{(\pi - x) \sin x}{1+\cos^2 x} dx$$

In other words,

$$\int_0^\pi \frac{x \sin x}{1+\cos^2 x} dx = \int_0^\pi \frac{\pi \sin x}{1+\cos^2 x} dx - \int_0^\pi \frac{x\sin x}{1+\cos^2 x} dx$$

and hence

$$2 \int_0^\pi \frac{x \sin x}{1+\cos^2 x} dx = \int_0^\pi \frac{\pi\sin x}{1+\cos^2 x} dx$$

So we can write the original integral as being equal to this integral:

$$\int_0^\pi \frac{x \sin x}{1+\cos^2 x} dx = \frac{\pi}{2} \int_0^\pi \frac{\sin x}{1+\cos^2 x} dx$$

Clear now?

• $\sin x$ missing in your integrand? – abel Dec 13 '14 at 0:24
• Why is it twice the one i'm after? Did you use the f(x)=f(a-x) equation? I don't follow your working – RobChem Dec 13 '14 at 10:49
• I've added working above. – Simon S Dec 13 '14 at 12:22

$\color{red}{\hat{I}=\displaystyle\int_{0}^\pi\dfrac{x\sin x}{1+\cos^2x}dx}=\color{blue}{\displaystyle\int_{0}^\pi\dfrac{(\pi-x)\sin x}{1+\cos^2x}dx=\hat{I}}$

$\therefore 2\hat{I}=\color{red}{\hat{I}}+\color{blue}{\hat{I}}=\color{green}{\pi\displaystyle\int_{0}^\pi\dfrac{\sin x}{1+\cos^2x}dx}$

$I=\displaystyle\int\dfrac{\sin x}{1+\cos^2x}dx=\displaystyle\int\dfrac{\sec x\tan x}{\sec^2x+1}dx$

$\therefore\sec x=z \implies \displaystyle\int\dfrac{\sec x\tan x}{\sec^2x+1}dx=\displaystyle\int\dfrac{dz}{z^2+1}$