# Evaluate $\int \frac{dx}{\sin{x}+\cos{x}}$

$$I=\int \frac{dx}{\sin{x}+\cos{x}}$$ My approach: $$\sin{x}+\cos{x}=\sqrt 2 \left({\sin{x}\over \sqrt 2}+{\cos{x}\over \sqrt 2}\right) =\sqrt 2 \left({\sin{x}\cos{{\pi\over 4}}}+\cos{x}\sin{\pi\over 4}\right)=\sqrt 2 \sin \left({x+{\pi\over 4}} \right)$$

$$\Rightarrow I=\int \frac{dx}{\sqrt 2 \sin \left({x+{\pi\over 4}} \right)}$$ $$= {1\over \sqrt2} \int {\csc \left({x+{\pi\over 4}} \right)}dx$$ $$={1\over \sqrt2}\log|\csc{\left({x+{\pi\over 4}} \right)}-\cot{\left({x+{\pi\over 4}} \right)}|+C$$

Any better way to do this?

• Better in what way? Easier? Faster? More intuitive? Deeper? – Brevan Ellefsen Feb 11 '17 at 21:44
• This method was used by my teacher in the class, unless or otherwise I wouldn't have been able solve this, so perhaps a more intuitive way? – Raknos13 Feb 11 '17 at 21:47
• $u = \tan {x \over 2}$ works well here – windircurse Feb 11 '17 at 21:49
• Well, $\int\frac{1}{\sin t}\,dt=\log\left|\tan\frac{t}{2}\right|+c$, but, apart from this, I see nothing much simpler. – egreg Feb 11 '17 at 21:49
• @windircurse True, but I wouldn't call that more intuitve :/ – Brevan Ellefsen Feb 11 '17 at 21:49