The integration of tanx is -ln|cosx| or ln|secx|, where ln denotes the natural logarithm, that is, logarithm with base e. Here we will learn how to find the integral of tanx dx.

## tanx Integration Formula

The tanx integration formula is given below.

- ∫tanx dx = -ln|cosx|+C
- ∫tanx dx = ln|secx|+C.

## Integration of tanx Proof

We will show that ∫tanx dx = -ln|cosx|+C. As $\tan x =\dfrac{\sin x}{\cos x}$, the integral of tanx will be equal to

∫tanx dx = $\int \dfrac{\sin x}{\cos x} \ dx$

Let us put cosx=z.

Differentiating, -sinx dx = dz.

So we have from above that

∫tanx dx = $\int \dfrac{-dz}{z}$

= – $\int \dfrac{dz}{z}$

= – ln|z|+C where C is a constant of integration

= -ln|cosx|+C as z=cosx.

So the integration of tanx is equal to -ln|cosx|+C (or) ln|secx|+C as secx=/cosx. This is obtained by the substitution method of integrations.

**Video Solution on Integration of tanx:**

**ALSO READ:**

## FAQs

**Q1: What is the Integration of tanx?**

Answer: The integration of tanx is -ln|cosx|+C where C is the integration constants.