<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] *

*OP's question: how to continue?

*existing answers: start over with simpler steps


So I feel the need to respond to the original question.
\begin{align}
\int \frac {1+\sin (x)}{1+\cos (x)} dx
&=\frac {1}{2} \int (\tan (\frac {x}{2}) +1)^2 dx \\
&= \frac12 \int (\tan^2(\frac x2)+1) dx + \int \tan(\frac x2) dx \\
&= \frac12 \int \sec^2(\frac x2) dx + \int \tan(\frac x2) dx \\
&= \tan(\frac x2) + 2\ln|\sec \frac x2| + C
\end{align}
</s>