Integrate $\int \frac{1}{1+ \tan x}dx$ Does this integral have a closed form?
$$\int \frac{1}{1+ \tan x}\,dx$$
My attempt:
$$\int \frac{1}{1+ \tan x}\,dx=\ln (\sin x + \cos x) +\int \frac{\tan x}{1+ \tan x}\,dx$$
What is next?

Continuation from the Work in the Question
$$
\begin{align}
\int\frac1{1+\tan(x)}\,\mathrm{d}x
&=\log(\sin(x)+\cos(x))+\int\frac{\tan(x)}{1+\tan(x)}\,\mathrm{d}x\tag1\\
&=\frac12\log(\sin(x)+\cos(x))+\frac12\int\frac{1+\tan(x)}{1+\tan(x)}\,\mathrm{d}x\tag2\\
&=\frac12(x+\log(\sin(x)+\cos(x)))+C\tag3
\end{align}
$$
Explanation:
$(1)$: copied from the question
$(2)$: average the left and right sides of $(1)$
$(3)$: $\int1\,\mathrm{d}x=x+C$

Another Approach
One can also try $u=\tan(x)$ and partial fractions:
$$
\begin{align}
\int\frac{\mathrm{d}x}{1+\tan(x)}
&=\int\frac{\mathrm{d}\tan(x)}{(1+\tan(x))\left(1+\tan^2(x)\right)}\tag4\\
&=\int\frac12\left(\frac1{1+u}+\frac{1-u}{1+u^2}\right)\mathrm{d}u\tag5\\
&=\frac12\left(\log(1+u)+\tan^{-1}(u)-\frac12\log\left(1+u^2\right)\right)+C\tag6\\
&=\frac12(x+\log(\sin(x)+\cos(x)))+C\tag7
\end{align}
$$
Explanation:
$(4)$: $\mathrm{d}\tan(x)=\left(1+\tan^2(x)\right)\,\mathrm{d}x$
$(5)$: $u=\tan(x)$ and partial fractions
$(6)$: integrate
$(7)$: backsubstitute
