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

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

Related calculator: Definite and Improper Integral Calculator

Please write without any differentials such as dxdx, dydy 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 contact us.

Your Input

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

Solution

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

cot(x)dx=cos(x)sin(x)dx{\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(x)u=\sin{\left(x \right)}.

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

Thus,

cos(x)sin(x)dx=1udu{\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 1u\frac{1}{u} is 1udu=ln(u)\int{\frac{1}{u} d u} = \ln{\left(\left|{u}\right| \right)}:

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

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

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

Therefore,

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

Add the constant of integration:

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

Answer

cot(x)dx=ln(sin(x))+C\int \cot{\left(x \right)}\, dx = \ln\left(\left|{\sin{\left(x \right)}}\right|\right) + CA