# 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.

-
Doesn't the inside reduce to $1/(1+t)^2$? –  Isaac Solomon Nov 23 '12 at 17:17
yes, but what then? –  user50222 Nov 23 '12 at 17:22
Beside to Issac's comment, can't you solve $\int (1/u^2)du?$ –  Babak S. Nov 23 '12 at 17:24
It would be -1/u + c. So... 1/(1+t)^2 should be -1/(1+t) + c... after substitution -1/(1+cos x) + c, but right answer is 1/(1+cos x)... then why? –  user50222 Nov 23 '12 at 17:31
Check the sign. Using your substitution $t=\cos x$ you should get $$\int \frac{1-\cos x}{\left( 1+\cos x\right) \sin x}dx=-\int \frac{1-t}{ \left( 1+t\right) \left( 1-t^{2}\right) }dt=-\int \frac{1}{\left( 1+t\right) ^{2}}dt$$ –  Américo Tavares Nov 23 '12 at 17:38

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.