Indefinite Integrals with tan(x)

 $\int \tan a x d x = - \frac {1}{a} \ln {\cos a x } +C$ $\int \tan ^2 a x d x = \frac { \tan ax}{a} - x +C$ $\int \tan ^3 a x d x = \frac {\tan^2 ax}{2a}+ \frac{1}{a} \ln {\cos a x}+C$ $\int \frac {\tan^n ax }{\cos^2 a x}dx = \frac {\tan^{n+1} a x}{(n+1)a} +C$ $\int \frac {1}{\cos^2 a x \tan ax }dx = \frac {1}{a} \ln {\tan a x} +C$ $\int \frac {dx}{ \tan ax } = \frac {1}{a} \ln {\sin a x} +C$ $\int x \tan ax dx = \frac {1}{a^2} \left \{\frac{(a x)^3}{3} + \frac{(ax)^5}{15}+ \frac {2(ax)^7}{105} + \cdot \cdot \cdot + \frac {2^{2n}(2^{2n-1})Bn(ax)^{2n-1}}{(2n+1)!} + \cdot \cdot \cdot \right \} +C$ $\int \frac {\tan ax }{ x } dx = ax + \frac{(a x)^3}{9} + \frac{2(ax)^5}{75} + \cdot \cdot \cdot + \frac {2^{2n}(2^{2n-1})Bn(ax)^{2n-1}}{(2n-1)(2n)!} + \cdot \cdot \cdot +C$ $\int x \tan^2 ax dx = \frac {x \tan ax}{a} + \frac {1}{a^2} \ln {\cos a x} - \frac {x^2}{2} +C$ $\int \frac {dx}{p+q \tan ax} = \frac {px}{p^2+q^2} + \frac {q}{a(p^2+q^2)} \ln {\left( q\sin a x + p \cos ax \right)} +C$ $\int \tan^n ax dx = \frac {\tan^{n+1}ax}{(n+1)a} -\int \tan^{n-2} a x dx +C$