Indefinite Integrals with $\frac{1}{\cos x}$

 $\int \frac {dx }{\cos a x}dx = \frac {1}{a} \ln { \left( \frac {1} {\cos ax} + \tan ax \right ) } = \frac {1}{a} \ln { \left( \frac {ax}{2} +\frac {\pi}{4} \right) }+C$ $\int \frac {dx}{ \cos^2 ax }= \frac {\tan ax} {a} +C$ $\int \frac {1}{ \cos^3 ax }dx = \frac {\tan ax}{2a \cos ax}+ \frac {1}{2a} \ln { \left( \frac{1}{\cos ax}+ {\tan a x} \right) } +C$ $\int \frac {1}{\cos^n ax} \tan ax dx= \frac{a}{na \cos^nax} +C$ $\int \cos ax dx = \frac {\sin ax}{a} +C$ $\int \frac {xdx} {\cos ax} = \frac {1}{a^2} \left \{ \frac {(ax)^2}{2}+ \frac{(a x)^4}{8}+\frac {5(ax)^6}{144} + \cdot \cdot \cdot + \frac {En(ax)^{2n+2}}{(2n+2)(2n)!} + \cdot \cdot \cdot \right \} +C$ $\int \frac {dx}{x \cos ax } = \ln {x} + \frac {(ax)^2} {4} + \frac{5(a x)^4}{96}+\frac{61(ax)^6 }{4320}+ \cdot \cdot \cdot + \frac {En(ax)^{2n}}{2n(2n)!} + \cdot \cdot \cdot +C$ $\int x \cos^2 ax dx = - \frac {x \cot ax}{a} + \frac {1}{a^2} \ln {\sin a x} - \frac {x^2}{2} +C$ $\int \frac {x dx}{ \cos^2 ax} = \frac {x}{a} \tan ax + \frac {1}{a^2} \ln { \cos ax } +C$ $\int \frac {dx}{q+\frac {p}{\cos ax}}= \frac{x}{q}+\frac{p}{q} \int \frac{dx}{p+q\cos ax} +C$ $\int \cos^n ax dx = \frac {\tan ax}{a(n-1)\cos^{n-2}ax} + \frac {n-2}{n-1} \int \frac {dx}{\cos^{n-2} a x } +C$