Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

$$ \int \frac {1}{\sin x + \cos x} dx$$

How would I go about solving this?

share|improve this question
have you tried wierstrass subtitution ? –  aziiri Jan 27 '13 at 21:33

2 Answers 2

up vote 7 down vote accepted

Hint: $\sin x + \cos x = \sqrt{2} \cos(x - \frac{\pi}{4})$. Now it's a matter of integrating $\sec u$ for $u = x - \frac{\pi}{4}$.

share|improve this answer

The easiest way is to proceed as @AymanHourieh has suggested. Another approach is using Weierstrass substitution. Let $t = \tan(x/2)$. Note that $$\sin(x) = \dfrac{2 \tan(x/2)}{1+\tan^2(x/2)} = \dfrac{2t}{1+t^2}; \,\,\,\,\, \cos(x) = \dfrac{1-\tan^2(x/2)}{1+\tan^2(x/2)} = \dfrac{1-t^2}{1+t^2}$$ $$dt = \dfrac{\sec^2(x/2) dx}2 \implies dx = \dfrac{2dt}{1+t^2}$$ Hence, $$I = \int \dfrac{dx}{\sin(x) + \cos(x)} = \int \dfrac{2dt}{1-t^2 + 2t} = \int\dfrac{2dt}{2-(t-1)^2}$$ Now use partial fractions to write $\dfrac{2}{2-(t-1)^2}$ as $$\dfrac2{2-(t-1)^2} = \dfrac1{\sqrt{2}(t+\sqrt{2}-1)} - \dfrac1{\sqrt{2}(t-\sqrt{2}-1)}$$ Now integrate this out by, recalling that $$\int \dfrac{dt}{t+c} = \log(\vert t+c \vert) + \text{ constant}$$

share|improve this answer
thanks you, this is really beautiful –  Yola Feb 17 at 11:47

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.