Integration of tan(x)dx.
\int tan(x)dx \\tan(x)=\frac{sin(x)}{cos(x)} \\\Rightarrow \int tan(x)=\int \left ( \frac{sin(x)}{cos(x)} \right )dx
Let t=cos(x)
\\\Rightarrow\frac{dt}{dx} =\frac{d}{dx}cos(x)=-sin(x) \\\Rightarrow dx=-sin(x)dt \\= -\int \frac{1}{t}dt \\=-ln\left | t \right |+C
On putting the value of ‘t’
\\=-ln\left | cos(x) \right |+C