# What is the antiderivative of tanx dx?

Oct 7, 2015

The antiderivative of $\tan \left(x\right)$ is $- \ln \left(\cos \left(x\right)\right)$

#### Explanation:

We know $\tan \left(x\right) = \sin \frac{x}{\cos} \left(x\right)$.

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

We can use substitution to simplify the integral.

$u = \cos \left(x\right)$ and $\mathrm{du} = - \sin \left(x\right) \mathrm{dx}$

$\int \tan \left(x\right) \mathrm{dx} = \int \sin \frac{x}{\cos} \left(x\right) \mathrm{dx} = - \int \frac{1}{u} \mathrm{du} = - \ln \left(u\right) + C$

To get the answer, just plug $u$ back in to get:

$- \ln \left(\cos \left(x\right)\right)$