Integral $\int \frac{dx}{\tan x + \cot x + \csc x + \sec x}$ $$\int \frac{dx}{\tan x + \cot x + \csc x + \sec x}$$
$$\tan x + \cot x + \csc x + \sec x=\frac{\sin x + 1}{\cos x} +\frac{\cos x + 1}{\sin x} $$
$$= \frac{\sin x +\cos x +1}{\sin x \cos x}$$
$$t= \tan {\frac{x}{2}}$$
On solving ,
$$\frac{1}{\tan x + \cot x + \csc x + \sec x}=\frac{t(1- t)}{1+ t^2}$$
$$\implies \int \frac{\tan {\frac{x}{2}}(1-\tan {\frac{x}{2}})}{1+\tan^2 {\frac{x}{2}}}{dx}$$
I think, I have made the things more difficult. How can I proceed further? Is there any better substitution for it?

$$\begin{aligned}\int \frac{d x}{\tan x+\cot x+\csc x+\sec x}&=\int \frac{\cos x \sin x}{1+\cos x+\sin x} d x \\&= -\frac{1}{2} \int \frac{1-(\cos x+\sin x)^2}{1+\cos x+\sin x} d x \\& = -\frac{1}{2} \int(1-\cos x-\sin x) d x\\&= \frac{1}{2}(-x+\sin x-\cos x)+C\end{aligned}  $$
