Integral of $$$\csc{\left(x \right)}$$$

The calculator will find the integral/antiderivative of $$$\csc{\left(x \right)}$$$, with steps shown.

Related calculator: Integral Calculator

Solution

Rewrite the cosecant as $$$\csc\left(x\right)=\frac{1}{\sin\left(x\right)}$$$:

$${\color{red}{\int{\csc{\left(x \right)} d x}}} = {\color{red}{\int{\frac{1}{\sin{\left(x \right)}} d x}}}$$

Rewrite the sine using the double angle formula $$$\sin\left(x\right)=2\sin\left(\frac{x}{2}\right)\cos\left(\frac{x}{2}\right)$$$:

$${\color{red}{\int{\frac{1}{\sin{\left(x \right)}} d x}}} = {\color{red}{\int{\frac{1}{2 \sin{\left(\frac{x}{2} \right)} \cos{\left(\frac{x}{2} \right)}} d x}}}$$

Multiply the numerator and denominator by $$$\sec^2\left(\frac{x}{2} \right)$$$:

$${\color{red}{\int{\frac{1}{2 \sin{\left(\frac{x}{2} \right)} \cos{\left(\frac{x}{2} \right)}} d x}}} = {\color{red}{\int{\frac{\sec^{2}{\left(\frac{x}{2} \right)}}{2 \tan{\left(\frac{x}{2} \right)}} d x}}}$$

Let $$$u=\tan{\left(\frac{x}{2} \right)}$$$.

Then $$$du=\left(\tan{\left(\frac{x}{2} \right)}\right)^{\prime }dx = \frac{\sec^{2}{\left(\frac{x}{2} \right)}}{2} dx$$$ (steps can be seen »), and we have that $$$\sec^{2}{\left(\frac{x}{2} \right)} dx = 2 du$$$.

Therefore,

$${\color{red}{\int{\frac{\sec^{2}{\left(\frac{x}{2} \right)}}{2 \tan{\left(\frac{x}{2} \right)}} d x}}} = {\color{red}{\int{\frac{1}{u} d u}}}$$

The integral of $$$\frac{1}{u}$$$ is $$$\int{\frac{1}{u} d u} = \ln{\left(\left|{u}\right| \right)}$$$:

$${\color{red}{\int{\frac{1}{u} d u}}} = {\color{red}{\ln{\left(\left|{u}\right| \right)}}}$$

Recall that $$$u=\tan{\left(\frac{x}{2} \right)}$$$:

$$\ln{\left(\left|{{\color{red}{u}}}\right| \right)} = \ln{\left(\left|{{\color{red}{\tan{\left(\frac{x}{2} \right)}}}}\right| \right)}$$

Therefore,

$$\int{\csc{\left(x \right)} d x} = \ln{\left(\left|{\tan{\left(\frac{x}{2} \right)}}\right| \right)}$$

Add the constant of integration:

$$\int{\csc{\left(x \right)} d x} = \ln{\left(\left|{\tan{\left(\frac{x}{2} \right)}}\right| \right)}+C$$

Answer

$$$\int \csc{\left(x \right)}\, dx = \ln\left(\left|{\tan{\left(\frac{x}{2} \right)}}\right|\right) + C$$$A