TITLE: What is $\int\frac{dx}{\sin x}$?
QUESTION [8 upvotes]: I'm looking for the antiderivatives of $1/\sin x$. Is there even a closed form of the antiderivatives? Thanks in advance.

REPLY [10 votes]: Let $R(u,v)$ be a rational function of $u$ and $v$, that is, a ratio of polynomials. Let $f(x)=R(\sin x, \cos x)$. Then there is a universal method for calculating $\int f(x)\,dx$, namely the Weierstrass substitution $t=\tan(x/2)$.
This substitution reduces the problem of integrating $f(x)$ to the problem of integrating a rational function of $t$. This can then be handled by the method of partial fractions.
Universal does not mean universally most efficient. We do not suggest the Weierstrass substitution for integrating $\cos x$!
Let's see what happens here. Let $t=\tan(x/2)$. It is standard (see the link above) that $\sin x=\frac{2t}{1+t^2}$ and $dx=\frac{2\,dt}{1+t^2}$. It follows that
$$\frac{dx}{\sin x}=\frac{dt}{t}=\ln(|t|)+C.$$