solving Integration of trignometry In the following integral
$$\int \frac {1}{\sec x+ \mathrm {cosec} x} dx $$
My try: Multiplied and divided by $\cos x$ and Substituting $\sin x =t$. But by this got no result.

$\displaystyle I = \int\frac{1}{\sec x+\csc x}dx = \frac{1}{2}\int\frac{\sin 2x}{\sin x+\cos x}dx = \frac{1}{2}\int\frac{(\sin x+\cos x)^2-1}{\sin x+\cos x}dx$
$\displaystyle I = \frac{1}{2}\int (\sin x+\cos x)dx - \frac{1}{2}\int \frac{1}{\sin x+\cos x}dx$
$\displaystyle I =\frac{1}{2}(\sin x-\cos x)-\frac{1}{2\sqrt{2}}\int \frac{1}{\sin (x+45^0)}dx$
$\displaystyle I = \frac{1}{2}(\sin x-\cos x)-\frac{1}{2\sqrt{2}}\int \csc (x+45^0)dx$
Use $\displaystyle \int \csc  xdx = \ln |\csc x-\cot x|+\mathcal{C} = \ln\tan \frac{x}{2}+\mathcal{C}$
