\documentclass[a4paper]{article}
\begin{document}
\begin{eqnarray*}
f (x)
 & = & \frac{1}{x^{p} (x - a)} \\
\end{eqnarray*}
\newpage
\begin{eqnarray*}
F (x)
 & = & \int \frac{1}{x^{p} (x - a)} \, \mbox{d}x \\
& = & \frac{1}{a^{p}} \ln | \, 1 - \frac{a}{x} \, | + \sum_{k = 1}^{k = p - 1} \frac{1}{k a^{p - k} x^{k}} + 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^{p}} \ln | \, 1 - \frac{a}{x} \, | + \sum_{k = 1}^{k = p - 1} \frac{1}{k a^{p - k} x^{k}} + c \right ) \\
& = & \frac{1}{a^{p}} \frac{1}{1 - \frac{a}{x}} \frac{a}{x^{2}} + \sum_{k = 1}^{k = p - 1} (- k) \frac{1}{k a^{p - k} x^{k + 1}} + 0 \\
& = & \frac{1}{a^{p}} \frac{a}{x (x - a)} - \sum_{k = 1}^{k = p - 1} \frac{1}{a^{p - k} x^{k + 1}} \\
& = & \frac{1}{a^{p}} \frac{a}{x (x - a)} - \sum_{k = 1}^{k = p - 1} \frac{1}{a^{p - k} x^{k + 1}} \frac{x - a}{x - a} \\
& = & \frac{1}{x^{p} (x - a)} \left ( \frac{x^{p - 1}}{a^{p - 1}} - \sum_{k = 1}^{k = p - 1} \frac{1}{a^{p - k} x^{k - p + 1}} (x - a) \right ) \\
& = & \frac{1}{x^{p} (x - a)} \left ( \left ( \frac{x}{a} \right )^{p - 1} - \frac{x - a}{x} \sum_{k = 1}^{k = p - 1} \frac{x^{p - k}}{a^{p - k}} \right ) \\
& = & \frac{1}{x^{p} (x - a)} \left ( \left ( \frac{x}{a} \right )^{p - 1} - \left ( 1 - \frac{a}{x} \right )
 \sum_{k = 1}^{k = p - 1} \left ( \frac{x}{a} \right )^{p - k} \right ) \\
& = & \frac{1}{x^{p} (x - a)} \Biggl ( \left ( \frac{x}{a} \right )^{p - 1} \\
 & & \qquad \qquad \qquad - \, \left ( 1 - \left ( \frac{x}{a} \right )^{-1} \right )
 \left ( \left ( \frac{x}{a} \right )^{p - 1} + \left ( \frac{x}{a} \right )^{p - 2} + \left ( \frac{x}{a} \right )^{p - 3} + \ldots
 + \left ( \frac{x}{a} \right )^{3} + \left ( \frac{x}{a} \right )^{2} + \frac{x}{a} \right ) \Biggr ) \\
& = & \frac{1}{x^{p} (x - a)} \Biggl ( \left ( \frac{x}{a} \right )^{p - 1}
 - \left ( \frac{x}{a} \right )^{p - 1} - \left ( \frac{x}{a} \right )^{p - 2} - \left ( \frac{x}{a} \right )^{p - 3} - \ldots
 - \left ( \frac{x}{a} \right )^{3} - \left ( \frac{x}{a} \right )^{2} - \frac{x}{a} \\
 & & \qquad \qquad \qquad + \, \left ( \frac{x}{a} \right )^{p - 2} + \left ( \frac{x}{a} \right )^{p - 3} + \left ( \frac{x}{a} \right )^{p - 4} + \ldots
 + \left ( \frac{x}{a} \right )^{2} + \frac{x}{a} + 1 \Biggr ) \\
& = & \frac{1}{x^{p} (x - a)} (1) \\
& = & \frac{1}{x^{p} (x - a)} \\
\end{eqnarray*}
\newpage
\begin{eqnarray*}
F (x)
 & = & \frac{1}{a^{p}} \ln | \, 1 - \frac{a}{x} \, | + \sum_{k = 1}^{k = p} \frac{1}{k a^{p - k} x^{k}} + c \\
\end{eqnarray*}
\end{document}
