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?

I may contribute by multiplying $(1-\cos(x))/(1-\cos(x)) $ :
$$ \int \frac{1 + \sin(x)}{1 + \cos(x)} dx= \int \frac{1 + \sin(x) - \cos(x) - \sin(x)\cos(x)}{1 - \cos^{2}(x)} dx = \int \frac{1 + \sin(x) - \cos(x) - \sin(x)\cos(x)}{\sin^{2}(x)} dx = \int \frac{\sin^{2}(x) + \cos^{2}(x) + \sin(x) - \cos(x) - \sin(x)\cos(x)}{\sin^{2}(x)} dx $$
$$ = \int \left(1 + \cot^{2}(x) + \frac{1}{\sin(x)}\right) dx - \int \frac{d(\sin(x))}{\sin^{2}(x)}  - \ln | \sin(x)|$$
$$= x + \int \cot^{2}(x)dx + \int \frac{1}{\sin(x)}dx + \frac{1}{\sin(x)}-\ln|\sin(x)| $$
Now for one integral, multiply by $(1+\cos(x))/(1+\cos(x)) $ :
$$ \int \frac{1}{sin(x)} dx = \int \frac{1+\cos(x)}{\sin(x)(1+\cos(x))} dx = \int \frac{\sin^{2}(x) + \cos^{2}(x) + \cos(x)}{\sin(x)(1+\cos(x))} dx $$
$$ \int \frac{\sin(x)}{1+\cos(x)}dx + \int \frac{\cos(x)}{\sin(x)} dx = - \ln|1+\cos(x)| + \ln|\sin(x)| $$
so ...
$$ \int \frac{1 + \sin(x)}{1 + \cos(x)} dx= x  - \ln|1+\cos(x)| + \frac{1}{\sin(x)} + \int \cot^{2}(x)dx$$
The last part may be continued..
