How do you integrate ∫tanxdx.
Step 1: Assume a variable
The given integration is,
∫tanxdx=∫sinxcosxdx
Let u=cosx.
∴du=-sinxdx
Step 2: Evaluate the integration
Substituting this in the above equation we get,
I=-∫duu
=-lnu+c [∵∫1xdx=lnx,cbetheintegrationconstant]
=-lncosx+c
=ln1cosx+c
=lnsecx+c
Hence, the required answer is ln(secx)+c.