# How to solve $\int \cot^3 x\,dx$?

I'm trying to solve $\int \cot^3 x\,dx$ by substitution but I can't get it right. Here's what I did:

$$\int \cot^3x\,dx = \int(\csc^2x - 1)\cdot\cot x \,dx$$ $$-\int\cot x\,dx + \int \cot x \cdot \csc^2x \, dx$$

Let $u = \csc x\, du = -\csc x \cdot\cot x\,dx$

$$-\csc^2 x - \int u \,du = -\csc^2 x - \frac{u^2}{2} = -\csc^2 x - \frac{\csc^2x}{2}.$$

My problem is that the result in the solution manual is different, namely:

$$-\frac{\cot^2x}{2} - \ln\left|\sin(x)\right| + C$$

What's wrong with my solution?

• Another way to do the cosecant integral is $u=\cot{x}$ because then $du=-\csc^2{x}$ the terms differ by a constant (taken care of by the $+C$) – Triatticus Feb 1 '18 at 16:05
• You don't solve integrals. You calculate them. – AccidentalFourierTransform Feb 1 '18 at 16:18

The correct result is that $\int \cot (x) \,dx = \ln \left|\sin (x)\right|$. You have evaluated the other integral i.e. $\int \cot (x) \csc^2(x) \, dx$ correctly.
For $\int \cot(x) \, dx$ simply note that it is of the form $\int \cot(x) \,dx =\int\frac{d(\sin(x))}{\sin(x)}$ which is simply $\ln\left|\sin(x)\right|$
write $$\cot(x)^3$$ as $$\frac{\cos(x)(1-\sin(x)^2)}{\sin(x)^3}$$ and substitute $$t=\sin(x)$$
$$I_n = \int \cot^n x\ \text d x = \int \cot^{n-2 } \csc^2 x \ \text d x - \int\cot^{n-2} x\ \text d x = -\dfrac{1}{n-1}\cot^{n-1} x - I_{n-2} + C$$
By using $$\text d (\cot x) = -\csc^2 x\ \text d x$$ on first integral.