How would you compute this integral? $$ \int \frac {1-\cos x}{(1+\cos x)\sin x} dx$$ 
I tried to expand the fraction by sin x and substitute t = cos x, so I got $$ \int \frac{(1-t)}{(1+t)(1-t)(1+t)} dt$$ here i could cancel out (1-t)... but what next? I don't know which formula should be used.

Hint: $$\int\frac{1-\cos x}{(1+\cos x)\sin x}dx=\int\frac{1-\cos^2 x}{(1+\cos x)^2\sin x}dx=\int\frac{\sin^2 x}{(1+\cos x)^2\sin x}dx=\int\frac{\sin x}{(1+\cos x)^2}dx$$ Now take $t=\cos x$ as you noted before.
