<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] You were almost there, just substitute $t=\tan(\frac x2)$ now.
$\displaystyle\dfrac 12\int \left(1+\tan(\dfrac x2)\right)^2\mathop{dx}=\int \dfrac{(1+t)^2}2\times\dfrac{2\mathop{dt}}{1+t^2}=\int \left(1+\dfrac{2t}{1+t^2}\right)\mathop{dt}=t+\ln(1+t^2)+C$
Remark that you can substitute directly without intermediate trigonometric changes :
$\dfrac{1+\sin(x)}{1+\cos(x)}=\dfrac{1+\frac{2t}{1+t^2}}{1+\frac{1-t^2}{1+t^2}}=\dfrac{1+2t+t^2}{2}$
</s>