\documentclass[a4paper]{article}
\begin{document}
\begin{eqnarray*}
f (x)
 & = & \cos^{-8} (ax) \\
& = & \frac{1}{\cos^{8} (ax)} \\
& = & \sec^{8} (ax) \\
\end{eqnarray*}
\newpage
\begin{eqnarray*}
F (x)
 & = & \int \frac{1}{\cos^{8} (ax)} \, \mbox{d}x \\
& = & \int \frac{1 \cdot 1 \cdot 1}{\cos^{8} (ax)} \, \mbox{d}x \\
& = & \int \frac{(\sin^{2} (ax) + \cos^{2} (ax)) (\sin^{2} (ax) + \cos^{2} (ax)) (\sin^{2} (ax) + \cos^{2} (ax))}{\cos^{8} (ax)} \, \mbox{d}x \\
& = & \int \frac{\sin^{6} (ax) + 3 \cos^{2} (ax) \sin^{4} (ax) + 3 \cos^{4} (ax) \sin^{2} (ax) + \cos^{6} (ax)}{\cos^{8} (ax)} \, \mbox{d}x \\
& = & \int \left ( \frac{\sin^{6} (ax)}{\cos^{8} (ax)} + 3 \frac{\cos^{2} (ax) \sin^{4} (ax)}{\cos^{8} (ax)} +
 3 \frac{\cos^{4} (ax) \sin^{2} (ax)}{\cos^{8} (ax)} + \frac{\cos^{6} (ax)}{\cos^{8} (ax)} \right ) \, \mbox{d}x \\
& = & \int \left ( \frac{\sin^{6} (ax)}{\cos^{8} (ax)} + 3 \frac{\sin^{4} (ax)}{\cos^{6} (ax)} +
 3 \frac{\sin^{2} (ax)}{\cos^{4} (ax)} + \frac{1}{\cos^{2} (ax)} \right ) \, \mbox{d}x \\
& = & \int \left ( 1 + 3 \frac{\sin^{2} (ax)}{\cos^{2} (ax)} + 3 \frac{\sin^{4} (ax)}{\cos^{4} (ax)} + \frac{\sin^{6} (ax)}{\cos^{6} (ax)} \right )
 \frac{1}{\cos^{2} (ax)} \, \mbox{d}x \\
& = & \int (1 + 3 \tan^{2} (ax) + 3 \tan^{4} (ax) + \tan^{6} (ax)) \frac{1}{\cos^{2} (ax)} \, \mbox{d}x \\
& = & \int \frac{1}{a} (1 + 3 \tan^{2} (ax) + 3 \tan^{4} (ax) + \tan^{6} (ax)) \, \mbox{d}(\tan (ax)) \\
& = & \frac{1}{a} \left ( \tan (ax) + \tan^{3} (ax) + \frac{3}{5} \tan^{5} (ax) + \frac{1}{7} \tan^{7} (ax) \right ) + c \\
& = & \frac{1}{a} \tan (ax) + \frac{1}{a} \tan^{3} (ax) + \frac{3}{5a} \tan^{5} (ax) + \frac{1}{7a} \tan^{7} (ax) + c \\
\end{eqnarray*}
\newpage
\begin{eqnarray*}
f (x)
 & = & \frac{\mbox{d}(F (x))}{\mbox{d}x} \\
& = & \frac{\mbox{d}}{\mbox{d}x}
 \left ( \frac{1}{a} \tan (ax) + \frac{1}{a} \tan^{3} (ax) + \frac{3}{5a} \tan^{5} (ax) + \frac{1}{7a} \tan^{7} (ax) + c \right ) \\
& = & \frac{1}{a} \frac{1}{\cos^{2} (ax)} a + \frac{3}{a} \tan^{2} (ax) \frac{1}{\cos^{2} (ax)} a +
 \frac{3}{a} \tan^{4} (ax) \frac{1}{\cos^{2} (ax)} a + \frac{1}{a} \tan^{6} (ax) \frac{1}{\cos^{2} (ax)} a + 0 \\
& = & \frac{1}{\cos^{2} (ax)} + 3 \tan^{2} (ax) \frac{1}{\cos^{2} (ax)} + 3 \tan^{4} (ax) \frac{1}{\cos^{2} (ax)} + \tan^{6} (ax) \frac{1}{\cos^{2} (ax)} \\
& = & \frac{1 + 3 \tan^{2} (ax) + 3 \tan^{4} (ax) + \tan^{6} (ax)}{\cos^{2} (ax)} \\
& = & \frac{1 + 3 \frac{\sin^{2} (ax)}{\cos^{2} (ax)} + 3 \frac{\sin^{4} (ax)}{\cos^{4} (ax)} + \frac{\sin^{6} (ax)}{\cos^{6} (ax)}}{\cos^{2} (ax)} \\
& = & \frac{\cos^{6} (ax) + 3 \sin^{2} (ax) \cos^{4} (ax) + 3 \sin^{4} (ax) \cos^{2} (ax) + \sin^{6} (ax)}{\cos^{8} (ax)} \\
& = & \frac{(\cos^{2} (ax) + \sin^{2} (ax))^{3}}{\cos^{8} (ax)} \\
& = & \frac{1}{\cos^{8} (ax)} \\
\end{eqnarray*}
\newpage
\begin{eqnarray*}
F (x)
 & = & \frac{1}{a} \tan (ax) + \frac{1}{a} \tan^{3} (ax) \\
 & & \qquad + \, \frac{3}{5a} \tan^{5} (ax) + \frac{1}{7a} \tan^{7} (ax) + c \\
\end{eqnarray*}
\end{document}
