Integration of $\frac{1}{\sin x+\cos x}$ I'm given this $\int\frac{1}{\sin x+\cos x}dx$.
My attempt,
$\sin x+\cos x=R\cos (x-\alpha)$
$R\cos \alpha=1$ and $R\sin \alpha=1$
$R=\sqrt{1^2+1^2}=\sqrt{2}$, 
$\tan\alpha=1$
$\alpha=\frac{\pi}{4}$
So, $\sin x+\cos x=\sqrt{2}\cos (x-\frac{\pi}{4})$
$\int\frac{1}{\sin x+\cos x}dx=\int \frac{1}{\sqrt{2}\cos (x-\frac{\pi}{4})}dx$
$=\frac{1}{\sqrt{2}}\int \sec (x-\frac{\pi}{4})dx$
$=\frac{1}{\sqrt{2}} \ln \left | \sec (x-\frac{\pi}{4})+\tan (x-\frac{\pi}{4}) \right |+c$
Am I correct? Is there another way to solve this integral? Thanks in advance.

Your computations are correct. Now, if you make the substitution $t = \tan\left(\frac{x}{2}\right)$, you get 
\begin{align}
\cos x &= \frac{1-t^{2}}{1+t^{2}} \\
\sin x &= \frac{2t}{1+t^{2}} \\
dx &= \frac{2 \, dt}{1+t^{2}}
\end{align} then
\begin{align}
\int \frac{dx}{\cos x + \sin x }  
&= -\int  \frac{dt}{t^{2}-2t-1 } = \frac{1}{\sqrt{2}}\rm arctanh \left(\frac{t-1}{\sqrt{2}}\right)+C.
\end{align}
