Is this correct integration for $\int\frac{1}{\sin(x)} \,\mathrm dx$

integrationtrigonometric-integrals

I've been searching the internet and I can't find out if this is the correct integration of $\int\frac{1}{\sin(x)}\,\mathrm dx$. I did this using a similar method to what I found for the integration of $\int\frac{1}{\cos(x)} \,\mathrm dx$.

$$\int\frac{1}{\sin(x)}\,\mathrm dx =\frac{\ln\left|\dfrac{\cos(x)+1}{\cos(x)-1}\right|}{2} $$

Best Answer

Here is yet another alternative for a given integral:
$\begin{aligned}\int\dfrac{1}{\sin x}\, \mathrm dx & = \int \csc x \, \mathrm dx =\\ & =\int \csc x \dfrac{\csc x +\cot x}{\csc x +\cot x}\, \mathrm dx=\\ & =\int\dfrac{\csc^2x+\csc x \cot x}{\csc x +\cot x}\,\mathrm dx=\begin{cases}u=\csc x + \cot x,\\ \mathrm du = -\csc x(\cot x +\csc x)\mathrm dx\end{cases}=\\ & = \int\dfrac{-\mathrm du}{u}=-\ln|u|+C=\boxed{-\ln|\csc x + \cot x|+C}.\end{aligned}$