# Evaluate the integral $\int \cot(x) \cos(x) \ dx$

I am asked to integrate

$$\int \cot(x) \cos(x) \ dx$$

How ca I do that? Using the trig substitution

$$\cos^2(x) = \frac{1}{2} \left( 1+\cos(2x) \right)$$

doesn't get me any further.

Thank you.

Observe that $$\int \cot(x) \cos(x) \, dx = \int \frac{\cos^2(x)}{\sin(x)} \, dx = \int \frac{1- \sin^2(x)}{\sin(x)} \, dx = \int [\text{cosec}(x) - \sin(x)] \, dx.$$ Using the standard integral $$\int \text{cosec}(x) \, dx = -\ln(\text{cosec}(x) + \cot(x)) + C,$$ it should now be quite simple to find your answer.

• Great, thank you. Best Regards! Commented Aug 9, 2016 at 11:26

$\int \cot x\cos x\ dx$

$=\cot x\int \cos x\ dx-\int\ \left(\frac{d}{dx}(\cot x)\int \cos x\ dx\right)dx$

$=\cot x\sin x-\int (-\csc^2x)\sin x\ dx$

$=\cos x+\int \csc x\ dx$

$=\cos x+\ln(\csc x-\cot x)+C$

$$\int \cot (x)\cos (x)dx=\int \frac { \cos { \left( x \right) } }{ \sin { \left( x \right) } } \cos (x)dx=\\ =\int { \frac { 1-\sin ^{ 2 }{ \left( x \right) } }{ \sin { \left( x \right) } } } dx=\int { \frac { dx }{ \sin { \left( x \right) } } -\int { \sin { \left( x \right) dx } } } =\\ =\int { \frac { \sin { \left( x \right) dx } }{ \sin ^{ 2 }{ \left( x \right) } } } +\cos { \left( x \right) =-\int { \frac { d\cos { \left( x \right) } }{ 1-\cos ^{ 2 }{ \left( x \right) } } } } +\cos { \left( x \right) = } \\ =-\frac { 1 }{ 2 } \left[ \int { \frac { d\cos { \left( x \right) } }{ 1-\cos { \left( x \right) } } +\frac { d\cos { \left( x \right) } }{ 1+\cos { \left( x \right) } } } \right] +\cos { \left( x \right) = } \\ =-\frac { 1 }{ 2 } \ln { \left| \frac { 1+\cos { \left( x \right) } }{ 1-\cos { \left( x \right) } } \right| +\cos { \left( x \right) } +C }$$

• You can use \begin{align} with \end{align} and &= to align your equals signs. It would make your solution easier to read. Commented Aug 9, 2016 at 12:14
• @Mattos,thank for advise,i can't write it as you sias ,but i will learn) Commented Aug 9, 2016 at 12:16

\begin{align} \int\cot(x)\cos(x)\,\mathrm{d}x &=\int\frac{\cos^2(x)}{\sin(x)}\,\mathrm{d}x\\ &=-\int\frac{\cos^2(x)}{\sin^2(x)}\,\mathrm{d}\cos(x)\\ &=\int\left(1-\frac1{1-\cos^2(x)}\right)\mathrm{d}\cos(x)\\ &=\cos(x)-\frac12\int\left(\frac1{1-\cos(x)}+\frac1{1+\cos(x)}\right)\mathrm{d}\cos(x)\\ &=\cos(x)+\frac12\log\left(\frac{1-\cos(x)}{1+\cos(x)}\right)+C\\[3pt] &=\cos(x)+\log\left|\frac{\sin(x)}{1+\cos(x)}\right|+C\\[3pt] &=\cos(x)+\log\left|\tan\left(\frac x2\right)\right|+C \end{align}

You can use IBP:

Let $u = \cot x$ and $dv = \cos x dx$

$$\int \cot x \cos x \ dx$$

$$= uv - \int [v] [du]$$

$$= (\cot x) \left[\int \cos x dx \right] - \int \left[\int \cos x dx \right]\left[\frac{d}{dx} \cot x dx \right]$$

$$= (\cot x) \left[\sin x \right] - \int \sin x \left[\frac{d}{dx} \cot x\right] dx$$