# How do I work out intcot(x)dx by substitution?

Jan 28, 2015

The key to this question is to use your trig identities to rewrite the integral:

$\int \cot \left(x\right) \mathrm{dx} = \int \cos \frac{x}{\sin} \left(x\right) \mathrm{dx}$

Now remember that what we are trying to find with substitution is some term being multiplied by it's derivative, which allows us to make use of a variant of the Chain Rule for derivatives that lets us work backwards:

$F ' \left(x\right) = f ' \left(g \left(x\right)\right) g ' \left(x\right)$

$F \left(x\right) = \int f ' \left(g \left(x\right)\right) g ' \left(x\right)$

$F \left(x\right) = \int f ' \left(u\right) \mathrm{du}$ where $u = g \left(x\right)$

Setting $u = \cos \left(x\right)$ doesn't seem to help us because the derivative of $\cos \left(x\right)$ is $- \sin \left(x\right)$. Setting $u = \sin \left(x\right)$, however, will make this one work. It won't always be immediately apparent what we should set $u$ to in all integrals solvable by substitution, so sometimes it takes trial and error before you start to remember some patterns.

Setting $u = \sin \left(x\right)$ gives us $\mathrm{du} = \cos \left(x\right)$.

Rewriting our integral:

$\int \cos \frac{x}{\sin} \left(x\right) \mathrm{dx}$ => $\int \frac{\mathrm{du}}{u} \implies \int {u}^{- 1} \mathrm{du}$, where $u = \sin \left(x\right)$

We must now remember that the Power Rule doesn't apply when the power is $- 1$, and that such integrals actually become $\ln \left(x\right)$

$\int {u}^{- 1} \mathrm{du} = \ln \left(u\right) + C$

Plugging our $u = \sin \left(x\right)$ back in:

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