Is it possible to obtain the result of the following integral analytically?
$$\int_0^x \cfrac{{\rm d}u}{1-u^n}$$
I've tried using quadrature, but the function goes to infinity at $u=1$, hence the integral.
EDIT
I suppose an analytic solution is not possible, so is there any way to calculate it numerically for $u>1$? I managed to write:
from math import *
from scipy.integrate import quad
f = lambda u,n: 1./(1.-(u**n))
eps = 0.0001; n=2.6;
# from 0 to 1.005
print quad(lambda x:f(x,n),0.0,1.-eps)[0]+ quad(lambda x:f(x,n) ,1.+eps,1.005)[0]
I implemented the Cauchy principle value method in python 2.7 using scipy. Is there are particular reason for it not to work. For (u=1.005, n=2.6, x=u) the result should have been 2.022 (according to this (Open-Channel Flow by Subhash C. Jain, p78)). Instead, it is 2.48. Am I missing something? Can we say that $$\int_0^{x+\epsilon}\frac{\mathrm{d}u}{1-u^n} = \int_0^{x-\epsilon}\frac{\mathrm{d}u}{1-u^n}$$
Here are the numerical solutions that are supposedly correct:

Solution:
Here is a snippet in python2.7 using the hyp2f1() function from the mpmath package
def F(u,n):
if u < 1:
return u*mpmath.hyp2f1(1/n,1,1/n+1,u**n)
elif u >1:
return (u**(1-n))/(n-1)* \
mpmath.hyp2f1(1-1/n, 1 , 2-1/n ,u**(-1*n)) #+ pi/n/tan(pi/n)
else:
return 0.

I can at least give your integral a name. Suppose $0 \leq x<1$ so that the integral converges.
Letting $u = v^{1/n}$, the integral becomes
$$ \frac{1}{n} \int_0^{x^n} v^{\frac{1}{n}-1}(1-v)^{-1}\,dv = \frac{1}{n}B\left(x^n;\,\frac{1}{n},\,0\right), $$
where $B(z;p,q)$ is the incomplete beta function. According to MathWorld, we can also write this as a hypergeometric function:
$$ x\cdot{}_2F_1\left(\frac{1}{n},\,1;\,\frac{1}{n}+1;\,x^n\right). $$
It appears (based on numerical evidence) that the principal value of the integrand is given by
$$ \text{PV} \int_0^x \frac{du}{1-u^n} = \operatorname{Re}\left[x\cdot{}_2F_1\left(\frac{1}{n},\,1;\,\frac{1}{n}+1;\,x^n\right)\right]. $$
This is in regards to the table posted in the question. They are not using the principal value of the integral; they are using a related quantity which differs from the principal value by a function depending only on $n$.
Let $0 < \epsilon < \min\{1,x-1\}$ and split the integral up into two parts,
$$ \begin{align*} &\int_0^{1-\epsilon} \frac{du}{1-u^n} + \int_{1+\epsilon}^{x} \frac{du}{1-u^n} \\ &\qquad = (1-\epsilon)\cdot{}_2F_1\left(\frac{1}{n},\,1;\,\frac{1}{n}+1;\,(1-\epsilon)^n\right) + \int_{1+\epsilon}^{x} \frac{du}{1-u^n}. \end{align*} $$
Making the substitution $u=1/v$ in the remaining integral gives
$$ \begin{align*} \int_{1+\epsilon}^{x} \frac{du}{1-u^n} &= -\int_{1/x}^{1/(1+\epsilon)}\frac{v^{n-2}}{1-v^n}\,dv \\ &= \int_0^{1/x}\frac{v^{n-2}}{1-v^n}\,dv - \int_0^{1/(1+\epsilon)}\frac{v^{n-2}}{1-v^n}\,dv. \end{align*} $$
Both of these integrals are treated the same way. We proceed as before, letting $v=w^{1/n}$. This gives
$$ \begin{align*} \int_0^a \frac{v^{n-2}}{1-v^n}\,dv &= \frac{1}{n} \int_0^{a^n} w^{\frac{n-1}{n}-1} (1-w)^{-1}\,dw \\ &= \frac{a^{n-1}}{n-1}\, {}_2F_1\left(1-\frac{1}{n},\,1;\,2-\frac{1}{n};\,a^n\right), \end{align*} $$
so that
$$ \begin{align*} \int_{1+\epsilon}^{x} \frac{du}{1-u^n} &= \frac{x^{1-n}}{n-1}\, {}_2F_1\left(1-\frac{1}{n},\,1;\,2-\frac{1}{n};\,x^{-n}\right) \\ &\qquad - \frac{(1+\epsilon)^{1-n}}{n-1}\, {}_2F_1\left(1-\frac{1}{n},\,1;\,2-\frac{1}{n};\,(1+\epsilon)^{-n}\right). \end{align*} $$
Thus
$$ \text{PV} \int_0^x \frac{du}{1-u^n} = \frac{x^{1-n}}{n-1}\, {}_2F_1\left(1-\frac{1}{n},\,1;\,2-\frac{1}{n};\,x^{-n}\right) + f(n), \tag{1} $$
where
$$ \begin{align*} f(n) &= \lim_{\epsilon \to 0} \left\{(1-\epsilon)\cdot{}_2F_1\left(\frac{1}{n},\,1;\,\frac{1}{n}+1;\,(1-\epsilon)^n\right) \right. \\ &\qquad\qquad\qquad \left. - \frac{(1+\epsilon)^{1-n}}{n-1}\, {}_2F_1\left(1-\frac{1}{n},\,1;\,2-\frac{1}{n};\,(1+\epsilon)^{-n}\right)\right\} \\ &= \frac{\pi}{n} \cot\left(\frac{\pi}{n}\right) \tag{2} \end{align*} $$
if $n>1$. The last equality $(2)$ follows directly from robjohn's work by letting $x \to \infty$ in $(1)$. So, in summary,
In computing their table, they seem to have assumed that $f(n) = 0$. Indeed, their table is exactly equal to the one generated by
$$ g(n,x) = \text{PV} \int_0^x \frac{du}{1-u^n} - \frac{\pi}{n} \cot\left(\frac{\pi}{n}\right). $$
For example,
$$ \begin{align*} g(2.6,1.01) &\approx 1.75625, \\ g(2.6,1.02) &\approx 1.4927, \\ g(2.6,1.03) &\approx 1.33979, \\ g(2.6,1.04) &\approx 1.23215, \\ g(2.6,1.05) &\approx 1.14932. \end{align*} $$