Evaluate $\int \frac{1+\cos(x)}{\sin^2(x)}\,\operatorname d\!x$ I`m trying to solve this integral and I did the following steps to solve it but don't know how to continue.
$$\int \dfrac{1+\cos(x)}{\sin^2(x)}\,\operatorname d\!x$$

$$\begin{align}\int \dfrac{\operatorname d\!x}{\sin^2(x)}+\int \frac{\cos(x)}{\sin^2(x)}\,\operatorname d\!x &= \int \dfrac{\operatorname d\!x}{\sin^2(x)}+\int \frac{\cos(x)}{1-\cos^2(x)} \\
&=\int \sin^{-2}(x)\,\operatorname d\!x + \int \cos(x)\,\operatorname d\!x - \int \frac{\operatorname d\!x}{\cos(x)}\end{align}$$
Any suggestions how to continue?

Thanks!

Hints:
$1+\cos x=2 \cos^2 \dfrac{x}{2}$
$\sin^2 x=(2\sin\dfrac{x}{2} \cos \dfrac{x}{2})^2$
You expression will be $\dfrac{1}{2} \int \dfrac{1}{\sin^2\dfrac{x}{2}}$
