<s>[INST] Evaluating: $\int \frac {1+\sin (x)}{1+\cos (x)} dx$ 
Evaluate: $\int \dfrac {1+\sin (x)}{1+\cos (x)} dx$

My Attempt:
$$=\int \dfrac {1+\sin (x)}{1+\cos (x)} dx$$
$$=\int \dfrac {(\sin (\dfrac {x}{2}) + \cos (\dfrac {x}{2}))^2}{2\cos^2 (\dfrac {x}{2})} dx$$
$$=\dfrac {1}{2} \int (\dfrac {\sin (\dfrac {x}{2}) + \cos (\dfrac {x}{2})}{\cos (\dfrac {x}{2})})^2 dx$$
$$=\dfrac {1}{2} \int (\tan (\dfrac {x}{2}) +1)^2 dx$$
How do I continue?
 [/INST] Here is another trick
$$
\begin{align}
I&=\int \dfrac {1+\sin (x)}{1+\cos (x)} dx\\
&=\int \dfrac {1+ \sin(0)+\sin (x)}{\cos(0)+\cos (x)} dx\\
&=\int \dfrac {1+ 2\sin(x/2)\cos (x/2)}{2\cos^2(x/2)}dx\\
&=\int \dfrac {1}{2\cos^2(x/2)}dx+\int \dfrac {\sin(x/2)}{\cos(x/2)}dx\\
&=\int \dfrac {1}{2\cos^2(x/2)}dx+\int {\tan(x/2)}dx\\
I&=\tan(x/2)-2\ln|\cos(x/2)|+K
\end{align}
$$
</s>