How do you integrate tanx ?
Integration is exactly the reverse process of differentiation. It is also known as antiderivative of a function.
Answer : ∫ tanx dx = - ln |cosx + c|
To integrate tanx we will express tanx in terms of sinx / cosx
∫ tanx dx = ∫ sinx/cosx.dx
I = ∫ sinx/cosx.dx ------------ (1)
Assume u = cosx
Thus, du = - sinx dx
-du = sinx dx
Substituting u and du in the RHS of (1) we get,
I = ∫ (-1/u).du
= - In |u| + C [Since, ∫1/x.dx = In |x| + C]
where, C is the constant of indefinite integration
On substituiting u = cosx we will get,
= - ln |cosx + C|