# I need assistance in integrating $\frac{x \sin x}{1+(\cos x)^2}$

Find the integral

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

• Use the variable change $x=\pi-y$. – user 1591719 Feb 6 '13 at 20:20
• @Chris'sister Would this help ? – Amr Feb 6 '13 at 20:20
• @Amr: yes, since you get the the same integral in the right side with the sign changed. – user 1591719 Feb 6 '13 at 20:26

Integrate by parts:

\begin{align}\int_0^{\pi} dx\: \frac{x \sin x}{1+(\cos x)^2} &= -\int_0^{\pi} d(\cos{x})\: \frac{x}{1+(\cos x)^2}\\ &= -[x \arctan{\cos{x}}]_0^{\pi} + \underbrace{\int_0^{\pi} dx \:\arctan{\cos{x}}}_{\mathrm{this} = 0} \\ &= \frac{\pi^2}{4} \end{align}

Keep in mind that I used the principal branch of the arctangent.

• That's a fast way (+1) – user 1591719 Feb 6 '13 at 20:45
• Thanks, and you got (+1) from me for doing the integral another way. I think both of us exploited the symmetry, but came across it differently. – Ron Gordon Feb 6 '13 at 20:47
• Right. It's a kind of easy problem often met in high school. – user 1591719 Feb 6 '13 at 20:52

Solution 1
Let the variable change $x=\pi-y$, and then

$$I=\int_0^{\pi} \frac{x \sin x}{1+(\cos x)^2}\mathrm{dx}=-\int_{0}^{\pi} \frac{ y\sin y}{1+(\cos y)^2}\mathrm{dy}+\pi\int_0^{\pi}\frac{\sin y}{1+(\cos y)^2}\mathrm{dy}$$ $$I=-\frac{\pi}{2}\int_0^{\pi}\frac{(\cos x)'}{1+(\cos x)^2}\mathrm{dx}$$ $$I=\frac{\pi}{2}[-\arctan(\cos x)]_0^{\pi}=\frac{\pi^2}{4}$$

Solution 2 (the fast way)

We recall and employ the formula

$$\int_0^\pi xf(\sin x )\mathrm{dx}=\frac \pi2\int_0^\pi f(\sin x )\mathrm{dx}$$

that I used in another answer you may see here. Then $$\int_0^{\pi} \frac{x \sin x}{1+(\cos x)^2}\mathrm{dx}=-\frac{\pi}{2}\int_0^{\pi} \frac{(\cos x)'}{1+(\cos x)^2}\mathrm{dx}=\frac{\pi}{2}[-\arctan(\cos x)]_0^{\pi/2}=\frac{\pi^2}{4}$$ $\quad$

• Thanks,but i was specifically instructed to use other methods other than that... – Sabrina Ahmed Feb 6 '13 at 20:30
• @SabrinaAhmed: well, you didn't specify that in your question. – user 1591719 Feb 6 '13 at 20:32
• Sorry about that. But do you think there's another way? – Sabrina Ahmed Feb 6 '13 at 20:39
• @SabrinaAhmed: then check rlgordonma's answer that approached the problem differently. – user 1591719 Feb 6 '13 at 20:44