# Evaluate $\int_{-\pi}^{\pi} {2x(1+\sin x)\over1+\cos^2x} \,\, \mathrm{d}x$

This is my question, $$\int_{-\pi}^{\pi} {2x(1+\sin x)\over1+\cos^2x} \,\, \mathrm{d}x$$

(1) $\pi^2\over4$

(2) $\pi^2$

(3) zero

(4) $\pi\over2$

I first broke the function into parts: $\int_{-\pi}^{\pi} {2x\over1+\cos^2x}$+ $\int_{-\pi}^{\pi} {2x\sin x\over1+\cos^2x}$. Here $\int_{-\pi}^{\pi} {2x\over1+\cos^2x}$being an odd function becomes zero and$\int_{-\pi}^{\pi} {2x\sin x\over1+\cos^2x}$being an even function can be written as 4$\int_{0}^{\pi} {x\sin x\over1+\cos^2x}dx$ and now I used the property $\int_{0}^{a} {f(a-x)}dx$. Then,I'm stuck.

Please explain any steps that you give.

I'm not an expert on definite integrals such as this, but it looks like you're on the right track. I don't think you quite finished what your property was, but I think I see the direction it was headed in. So from

$$4\int_0^\pi\frac{x\sin xdx}{1+\cos^2x}$$

substitute

$$u=\pi-x,du=-dx$$ $$4\int_0^\pi\frac{x\sin xdx}{1+\cos^2x}=-4\int_\pi^0\frac{(\pi-u)\sin(\pi-u)du}{1+\cos^2(\pi-u)}=$$ $$4\int_0^\pi\frac{(\pi-u)\sin udu}{1+(-\cos u)^2}$$

Finally, since the variable is just a placeholder, let's just replace $u$ with $x$ again to get

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

Summing these gives $$2I=4\int_0^\pi\frac{\pi\sin xdx}{1+\cos^2x}$$ $$u=\cos x,du=-\sin xdx$$ $$I=-2\pi\int_1^{-1}\frac{du}{1+u^2}=2\pi(\tan^{-1}u]_{-1}^1)=2\pi(\frac{\pi}4+\frac\pi4)=\pi^2$$

So assuming I've done everything right, I arrive at answer 2.

• @Mike..Yeah i was certainly stuck at that.And,yes you're right.Thanks for the help. – Yash Lekhwani May 11 '14 at 11:33

Using symmetry we get $$J:=\int_{-\pi}^\pi{2x(1+\sin x)\over 1+\cos^2 x}\ dx=4\int_0^\pi x\>{\sin x\over 1+\cos^2 x}\ dx\ .$$ Partial integration then gives $$J=4\left(-x\arctan(\cos x)\biggr|_0^\pi +\int_0^\pi\arctan(\cos x)\ dx\right)\ .$$ As $x\mapsto \cos x$ is odd with respect to $x={\pi\over2}$ the last integral vanishes, so that we are left with $$J=-4\pi\arctan(\cos\pi)=-4\pi\bigl(-{\pi\over4}\bigr)=\pi^2\ .$$

Using $\displaystyle\int_a^bf(x)\ dx=\int_a^bf(a+b-x)\ dx\ \ \ \ (1)$

If $\displaystyle f(x)=\frac{2x(1+\sin x)}{1+\cos^2x}, f\left(-\pi+\pi-x\right)=f(-x)=\frac{-2x(1-\sin x)}{1+\cos^2(-x)}=\frac{2x\sin x-2x}{1+\cos^2x}$

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

$$\implies I+I=4\int_{-\pi}^{\pi}\frac{x\sin x}{1+\cos^2x}\ dx$$

Again if $\displaystyle g(x)=\frac{x\sin x}{1+\cos^2x}, g(-x)=\frac{(-x)\sin(-x)}{1+\cos^2(-x)}=\frac{x\sin x}{1+\cos^2x}$ i.e., $g(x)$ is even

$$\text{ As for even }g(x),\int_{-a}^ag(x)dx=2\int_0^ag(x)dx,$$

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

Again, using $(1),$

$$J=\int_0^{\pi}\frac{x\sin x}{1+\cos^2x}\ 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^2x}\ dx$$

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

Set $\displaystyle \cos x=u$