Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

I tried letting $u=\tan(\frac{x}{2})$ but could not make it work. A few other trig substitutions failed as well. I noticed the integrand is odd but could not make use of that fact. Any ideas?

share|cite|improve this question
up vote 6 down vote accepted

Note that the denominator is symmetric with respect to $\frac{\pi}{2}$. So we have

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

and the integrand of the second integral is "odd with respect to $\frac{\pi}{2}$", so

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

We can evaluate that integral using the residue theorem similar to this, and obtain

$$\int_0^\pi \frac{x}{1+\cos^2 x}\,dx = \frac{\pi^2}{2\sqrt{2}}.$$

share|cite|improve this answer

Break up into $A$, the integral from $0$ to $\pi/2$, plus $B$, the integral from $\pi/2$ to $\pi$, For the second integral, make the change of variable $x=\pi -u$. We get $$B=\int_{x=\pi/2}^{\pi} \frac{x}{1+\cos^2 x}\,dx=\int_{\pi/2}^{0} -\frac{\pi-u}{1+\cos^2 u}\,du.$$ With sign changes, and replacement of the letter $u$ by the letter $x$, we get that $$B=\int_{0}^{\pi/2} \frac{\pi-x}{1+\cos^2 x}\,dx.$$ Add $A$. We get that $$A+B=\int_0^{\pi/2}\frac{\pi}{1+\cos^2 x}\,dx.$$ Now we are at a moderately standard integral.

share|cite|improve this answer

use this trigonometry identity

$\cos^2(x) = \frac{1}{2}+\frac{1}{2}\cos(2x)$

you will get



this is same as


please now substitute $y=2x$

share|cite|improve this answer
no no,i have changed – dato datuashvili Jan 15 '14 at 15:55
it should be $1/2$ multiply by cos(2x) – dato datuashvili Jan 15 '14 at 15:56
but can it computed by elementary fucntion? – dato datuashvili Jan 15 '14 at 16:00

As $\displaystyle\int_a^bf(x)dx=\int_a^bf(a+b-x)dx,$

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

$\displaystyle\implies I+I=\pi\int_0^\pi\frac1{1+\cos^2x}dx$

Now $\displaystyle \int_0^{2a}f(x)dx= \begin{cases} 2\int_0^af(x)dx &\mbox{if } f(2a-x)=f(x) \\ 0 & \mbox{if } f(2a-x)=-f(x) \end{cases} $

Here $\displaystyle a=\frac\pi2\implies \int_0^\pi\frac1{1+\cos^2x}dx=2\int_0^{\frac\pi2}\frac1{1+\cos^2x}dx $

Now $\displaystyle\int\frac1{1+\cos^2x}dx=\int\frac{\sec^2x}{2+\tan^2x}dx $

Set $\tan x=u$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.