# Integration of Tanx

Here you will learn proof of integration of tanx or tan x and examples based on it.

Let’s begin –

## Integration of Tanx or Tan x

The integration of tanx is – log |cos x| + C or log |sec x| + C

i.e. $$\int$$ (tanx) dx = – log |cos x| + C or,

$$\int$$ (tanx) dx = log |sec x| + C

Proof :

Let I = $$\int$$ (tan x) dx

Then, I = $$\int$$ $$sin x\over cos x$$ dx

Let cos x = t

Then, d(cos x) = dt $$\implies$$ -sin x dx = dt

$$\implies$$ dx = $$-dt\over sin x$$

Putting cos x = t, and dx = $$-dt\over sin x$$, we get

I = $$\int$$ $$sin x\over cos x$$ $$\times$$ $$-dt\over sin x$$

= $$\int$$ $$-1\over t$$ dt = – log |t| + C

= – log |cos x| + C

And cos x = $$1\over sec x$$

$$\implies$$ I = -log |1/sec x| + C = -$$log |sec^{-1} x|$$ + C = log |sec x| + C

Hence, $$\int$$ (tanx) dx = – log |cos x| + C or, $$\int$$ (tanx) dx = log |sec x| + C

Example : Evaluate : $$\int$$ $$\sqrt{{1-cos 2x}\over {1+cos 2x}}$$ dx

Solution : We have,

I = $$\int$$ $$\sqrt{{1-cos 2x}\over {1+cos 2x}}$$ dx

By Trigonometry formulas,

1 – cos 2x = $$2sin^2 x$$ and 1 + cos 2x = $$2cos^2 x$$

$$\implies$$ I = $$\int$$ $$\sqrt{{2sin^2 x}\over {2cos^2 x}}$$ dx

$$\implies$$ I = $$\int$$ $${sin x}\over {cos x}$$ dx

{$$\because$$ $${sin x}\over {cos x}$$ = tan x }

$$\implies$$ I = $$\int$$ tan x dx

$$\implies$$ I = log |sec x| + C = – log |cos x| + C

### Related Questions

What is the Differentiation of tan x ?

What is the Integration of tan inverse x ?

What is the Differentiation of tan inverse x ?