Integration involving the Gauss 2F1 Hypergeometric Function

hypergeometric function

According to WolframAlpha, the solution to the indefinite integral
$\int{\frac{x^n-1}{x-1}}dx$, where n is some constant is

$\frac{x^{n+1}{_2F_1}(1,n+1;n+2;x)}{n+1}-\log(1-x)+C$, where $\log$ denotes the natural logarithm and ${_2F_1}$ is the Gauss' hypergeometric function. I am still new to hypergeometric functions and that has just lost me completely; I have no idea how they arrived at this solution. Please if anyone could kindly explain to me how they came by this solution, I would be highly indebted to them. Please help. Thank you in advance.

Best Answer

tl;dr: Wolfram is giving the general solution that works even when $n$ isn't an integer.

Long version:

Let's look at the definition of $_2F_1$: $$ _2F_1(a,b;c;x) = \sum_{k=0}^\infty \frac{\Gamma(a+k)\Gamma(b+k)\Gamma(c)}{\Gamma(a)\Gamma(b)\Gamma(c+k)}\frac{x^k}{\Gamma(k+1)} $$ Plugging in $a = 1$, $b = n+1$, $c = n+2$ gives \begin{align} -\frac{x^{n+1}}{n+1}\,_2F_1(1,n+1;n+2;x) = &-\frac{x^{n+1}}{n+1}\sum_{k=0}^\infty \frac{\Gamma(1+k)\Gamma(n+1+k)\Gamma(n+2)}{\Gamma(1)\Gamma(n+1)\Gamma(n+2+k)}\frac{x^k}{\Gamma(k+1)} \\= &-\frac{x^{n+1}}{n+1}\sum_{k=0}^\infty \frac{n+1}{n+1+k}x^k \\ = &-\sum_{k=0}^\infty \frac{x^{n+1+k}}{n+1+k}. \end{align} Additionally using $\ln(1-x) = -\sum_{j=1}^\infty x^j/j$, Wolfram is saying $$ \int\frac{x^n-1}{x-1}dx = \sum_{j=1}^\infty\frac{x^j}{j} -\sum_{k=0}^\infty \frac{x^{n+1+k}}{n+1+k}. $$ Now at this point you may have noticed that the second sum will cancel out every term of the first sum beyond $j = n$. This is true, but only if $n$ is an integer. Wolfram never assumes any information you don't give it, so it gives the answer in terms of the hypergeometric function. If $n$ is an integer, the cancellation I mentioned happens, and you get $$ \int\frac{x^n-1}{x-1}dx = \sum_{j=1}^n\frac{x^j}{j} $$ as expected.

Related Question