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.

Another method would be to multiply by $\cos x-\sin x$ on the top and bottom to get
$\displaystyle\int\frac{\cos x-\sin x}{\cos 2x} dx=\int\frac{\cos x}{1-2\sin^2 x} dx-\int\frac{\sin x}{2\cos^2 x-1} dx$, and then use
$\displaystyle\int\frac{1}{1-2u^2}du=\frac{\sqrt{2}}{4}\ln\bigg|\frac{1+\sqrt{2}u}{1-\sqrt{2}u}\bigg|+C=\frac{\sqrt{2}}{2}\tanh^{-1}(\sqrt{2}u)+C$ to find both terms.
