# Using the method of replacing show that ∫tan(x)=dx=In|sec(x)|+constantSee correction

*print*Print*list*Cite

To evaluate this integral, it is best to remember that `tanx=sinx/cosx` , which suggests the substitution `u=cosx` . This means that `du=-sinxdx` , so the integral becomes:

`int tanxdx`

`=int sinx/cosx dx`

`=-int 1/udu` now integrate using logarithm rule

`=-ln|u|+C` where C is a constant of integration

`=-ln|cosx|+C` now switch negative 1 to exponent

`=ln|cosx|^{-1}+C` use trig definition of `secx` .

`=ln|secx|+C`

**The integral evaluates to `ln|secx|+C` .**

∫tan(x)=dx=In|sec(x)|+constante

∫tan x dx = ∫(sin x/cos x)dx

set

u = cos x.

then we find

du = - sin x dx

substitute du = -sin x, u = cos x

dx = - ∫(-1) sin x dx/cos x

= -∫du/u

Solve the integral

= - ln |u| + C

substitute back u=cos x

= - ln |cos x| + C

Q.E.D.

2. Alternate Form of Result

∫tan x dx = - ln |cos x| + C

= ln | (cos x)-1 | + C

= ln |sec x| + C

Therefore:

∫tan x dx = - ln |cos x| + C = ln |sec x| + C