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

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

Related calculator: Definite and Improper Integral Calculator

Please write without any differentials such as $$$dx$$$, $$$dy$$$ etc.
Leave empty for autodetection.

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please write it in the comments below.

Your Input

Find $$$\int \cot{\left(x \right)}\, dx$$$.

Solution

Rewrite the cotangent as $$$\cot\left(x\right)=\frac{\cos\left(x\right)}{\sin\left(x\right)}$$$:

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

Let $$$u=\sin{\left(x \right)}$$$.

Then $$$du=\left(\sin{\left(x \right)}\right)^{\prime }dx = \cos{\left(x \right)} dx$$$ (steps can be seen here), and we have that $$$\cos{\left(x \right)} dx = du$$$.

The integral becomes

$$\color{red}{\int{\frac{\cos{\left(x \right)}}{\sin{\left(x \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(u \right)}$$$

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

Recall that $$$u=\sin{\left(x \right)}$$$:

$$\ln{\left(\color{red}{u} \right)} = \ln{\left(\color{red}{\sin{\left(x \right)}} \right)}$$

Therefore,

$$\int{\cot{\left(x \right)} d x} = \ln{\left(\left|{\sin{\left(x \right)}}\right| \right)}$$

Add the constant of integration:

$$\int{\cot{\left(x \right)} d x} = \ln{\left(\left|{\sin{\left(x \right)}}\right| \right)}+C$$

Answer: $$$\int{\cot{\left(x \right)} d x}=\ln{\left(\left|{\sin{\left(x \right)}}\right| \right)}+C$$$