# Evaluate the Integral $$\int \frac{1}{x^{n}(T-x)^{n}} dx$$

This question was posed at Mathematics Stack Exchange, here is my solution.

For $$n \in \mathbb{N}$$.

\begin{align}
\int \frac{1}{x^{n}(T-x)^{n}} dx &= \frac{1}{T^{n}} \int \frac{1}{x^{n}(1-x/T)^{n}} dx \\
&= T^{1-2n} \int y^{-n} (1-y)^{-n} dy \\
&= T^{1-2n} \mathrm{B}_{y}(1-n,1-n) \\
&= T^{1-2n} \mathrm{B}_{x/T}(1-n,1-n) \\
&= \frac{1}{1-n} \frac{x^{1-n}}{T^{n}} {}_{2}\mathrm{F}_{1}(1-n,n;2-n;x/T)
\end{align}

We have used the incomplete Beta function and Gauss’s hypergeometric function.