# What is the antiderivative of tan(x)?

Oct 16, 2014

Recall:

$\int \frac{g ' \left(x\right)}{g \left(x\right)} \mathrm{dx} = \ln | g \left(x\right) | + C$

(You can verify this by substitution $u = g \left(x\right)$.)

Now, let us look at the posted antiderivative.

By the trig identity $\tan x = \frac{\sin x}{\cos x}$,

$\int \tan x \mathrm{dx} = \int \frac{\sin x}{\cos x} \mathrm{dx}$

by rewriting it a bit further to fit the form above,

$= - \int \frac{- \sin x}{\cos x} \mathrm{dx}$

by the formula above,

$= - \ln | \cos x | + C$

or by $r \ln x = \ln {x}^{r}$,

$= \ln | \cos x {|}^{- 1} + C = \ln | \sec x | + C$

I hope that this was helpful.

Apr 27, 2018

$\int$ $\tan x$ $\mathrm{dx} = \ln | \sec x | + C$

#### Explanation:

By $\tan x = \sin \frac{x}{\cos} x$,

$\int$ $\setminus \tan x$ $\mathrm{dx} = \setminus \int$ $\setminus \frac{\sin x}{\cos x}$ $\mathrm{dx}$

Let $u = \cos x$. => $\setminus \frac{\mathrm{du}}{\mathrm{dx}} = - \sin x$ => $\mathrm{dx} = \frac{\mathrm{du}}{- \sin x}$

By substitution,

$= \setminus \int$ $\frac{\sin x}{u} \cdot \frac{\mathrm{du}}{- \sin x}$

By cancelling $\sin x$'s,

$= - \setminus \int$ $\frac{1}{u}$ $\mathrm{du}$

By finding an antiderivative,

$= - \ln | u | + C$

By plugging $\cos x$ back in for $u$,

$= - \ln | \cos x | + C$

By the log property $r \ln x = \ln {x}^{r}$,

$= \ln | \cos x {|}^{- 1} + C$

By ${\left(\cos x\right)}^{- 1} = \frac{1}{\cos x} = \sec x$,

$= \ln | \sec x | + C$

Apr 27, 2018

A different approach...

#### Explanation:

We want to find $\int \tan x \mathrm{dx}$.

$\int \tan x \mathrm{dx} = \int \frac{\tan x \sec x}{\sec} x \mathrm{dx}$

Now let $u = \sec x$ and $\mathrm{du} = \sec x \tan x \mathrm{dx}$. Then

$\int \frac{\tan x \sec x}{\sec} x \mathrm{dx} = \int \frac{1}{u} \mathrm{du}$

This is a standard integral which evaluates to

$\ln \left\mid u \right\mid + \text{c"=lnabssecx+"c}$