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

$$\int^{\frac {\pi}2}_0 \frac {dx}{1+ \cos x}$$ $$\int^{\frac {\pi}2}_0 \frac {dx}{1+ \sin x}$$ It seems that substitutions make things worse:

$$\int \frac {dx}{1+ \cos x} ; t = 1 + \cos x; dt = -\sin x dx ; \sin x = \sqrt{1 - \cos^2 x} = \sqrt{1 - (t-1)^2} $$ $$ \Rightarrow \int \frac {-\sqrt{1 - (t-1)^2}}{t} = \int \frac {-\sqrt{t^2 + 2t}}{t} = \int \frac {-\sqrt t \cdot \sqrt t \cdot \sqrt{t + 2}}{\sqrt t \cdot t} $$

$$= \int \frac {- \sqrt{t + 2}}{\sqrt t } = \int - \sqrt{1 + \frac 2t} = ? $$

What next? I don’t know. Also, I’ve tried another “substitution”, namely $1 + \cos x = 2 \cos^2 \frac x2) $

$$ \int \frac {dx}{1+ \cos x} = \int \frac {dx}{2 \cos^2 \frac x2} = \int \frac 12 \cdot \sec^2 \frac x2 = ? $$ And failed again. Help me, please.

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


$$\text{As }\frac{d(\tan mx)}{dx}=m\sec^2mx,$$

$$\int\sec^2mx= \frac{\tan mx}m+C$$

here $m=\frac12$

or using Weierstrass substitution $\tan \frac x2=t,$

$\frac x2=\arctan t\implies dx=2\frac{dt}{1+t^2}$ and $\cos x=\frac{1-t^2}{1+t^2}$

$$\int \frac{dx}{1+\cos x}=\int dt=t+K=\tan\frac x2+K$$

share|cite|improve this answer
Thanks. Let's see: $ \Rightarrow \tan (x\frac 12) \cdot 2 = 2 (\tan \frac {\pi} {4} - \tan 0) = 2$ – epsigma Jul 2 '13 at 5:42
@epsigma, also as $t=\tan\frac x2, x=0\implies t=0$ and $ x=\frac\pi2\implies t=1$ So, $\int_0^1dt=t\big|_0^1=1-0=1$ – lab bhattacharjee Jul 2 '13 at 6:05
It should be $$\int\frac{1}{1+\cos x}\;dx=\tan\frac{x}{2}+K.$$. Indeed, you're correct about the substitution except for the last part. – Tunk-Fey Mar 17 '14 at 6:06
@Tunk-Fey,thanks for your observation – lab bhattacharjee Mar 17 '14 at 6:19

You were on the right track in the last line

$$ \frac{1}{2} \int \sec^2 \frac{x}{2} dx = \tan \frac{x}{2} + C $$

That's it. Put the limits in and you're done.

For the second one, substitute $t = \frac{\pi}{2} - x $ and you're back to the first integral

share|cite|improve this answer

Use this simple trigonometry manipulation: $$ \frac{1}{1+\cos x}=\frac{1}{1+\cos x}\cdot\frac{1-\cos x}{1-\cos x}=\frac{1-\cos x}{\sin^2 x}. $$ Therefore $$ \begin{align} \int\frac{1}{1+\cos x}\;dx&=\int\frac{1-\cos x}{\sin^2 x}\;dx\\ &=\int\frac{1}{\sin^2 x}\;dx-\int\frac{\cos x}{\sin^2 x}\;dx\\ &=-\int\;d(\cot x)-\int\frac{1}{\sin^2 x}\;d(\sin x)\\ &=-\cot x+\frac{1}{\sin x}+C\\ &=\frac{1-\cos x}{\sin x}+C\\ &=\frac{\sin^2\frac{1}{2}x+\cos^2\frac{1}{2}x-\cos^2\frac{1}{2}x+\sin^2\frac{1}{2}x}{2\sin\frac{1}{2}x\cos\frac{1}{2}x}+C\\ &=\tan\frac{1}{2}x+C. \end{align} $$ Similarly with $$ \frac{1}{1+\sin x}=\frac{1}{1+\sin x}\cdot\frac{1-\sin x}{1-\sin x}=\frac{1-\sin x}{\cos^2 x}. $$

$$ \text{# }\mathbb{Q.E.D.}\text{ #} $$

share|cite|improve this answer

$$ \begin{array}{lcl} \int_0^{\pi/2} \frac{1}{1+\cos x}dx &=& \int_0^{\pi/2} \frac{1}{(\cos^2(x/2)+\sin^2(x/2))+(\cos^2 (x/2)-\sin^2(x/2))}dx\\ &=& \int_0^{\pi/2} \frac{1}{2\cos^2(x/2)}dx\\ &=& \int_0^{\pi/4}\frac{1}{\cos^2u}du=\tan\frac{\pi}{4}=1 \end{array} $$

share|cite|improve this answer


Therefore, $$\int_0^{\pi/2}\dfrac{1}{1+\cos x}dx=\int_0^{\pi/2}\dfrac{1}{1+\sin x}dx$$

As you did $$\int_0^{\pi/2}\dfrac{1}{1+\cos x}dx=\frac{1}{2}\int_0^{\pi/2}\sec^2\frac{x}{2}dx$$

Substitute $x=2t$ and use $\int\sec^2 tdt=\tan t+C$

EDIT: Proof of $\int_a^bf(x)dx=\int_a^bf(a+b-x)dx$:

Let $I=\int_a^bf(x)dx$

Now, substitute $x=a+b-t\implies dx=-dt$

then $I=-\int_b^af(a+b-t)dt=\int_a^bf(a+b-t)dt=\int_a^bf(a+b-x)dx$$

share|cite|improve this answer
How do you knowthis: $\int_a^bf(x)dx=\int_a^bf(a+b-x)dx$ – epsigma Jul 2 '13 at 5:47
Let $u = a + b - x$ – Hawk Jul 2 '13 at 5:58

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.