I know how to prove it to be $\ln|\sin x|+C$, but I do not know the method to prove it this way.
thanks
$\endgroup$ 21 Answer
$\begingroup$You can integrate this by substitution. Notice that
$$\int \cot x \ \mathrm{d}x = \int \frac{\cos x}{\sin x} \ \mathrm{d}x$$
Make the substitution $u=\sin x$, which gives $\mathrm{d}u = \cos x \ \mathrm{d}x$. Hence: $$\int \frac{\cos x}{\sin x} \ \mathrm{d}x = \int \frac{1}{u} \ \mathrm{d}u = \ln|u|+c = \ln|\sin x| + c$$
A result that you need to know by memory is that $$\int \frac{\mathrm{f}'(x)}{\mathrm{f}(x)} \ \mathrm{d}x = \ln|\mathrm{f}(x)| + c$$ You can varify this for yourself by making the substitution $u=\mathrm{f}(x)$, giving $\mathrm{d}u = \mathrm{f}'(x) \, \mathrm{d}x$: $$\int \frac{\mathrm{f}'(x)}{\mathrm{f}(x)} \ \mathrm{d}x = \int \frac{1}{u}\,\mathrm{d}u = \ln |u|+c=\ln|\mathrm{f}(x)|+c$$
$\endgroup$ 3