<s>[INST] How to integrate $\int_0^1\frac{dx}{1+x+x^2+\cdots+x^n}$ I am interested in finding a solution to the integral
$$I_n=\int_0^1\frac{dx}{\sum_{k=0}^nx^k}$$
Since the denominator is a geometric series with $a=1$ and $r=x$ and it is within the radius of convergence, we should be able to say
$$\sum_{k=0}^nx^k=\frac{1-x^{n+1}}{1-x}=\frac{x^{n+1}-1}{x-1}$$
and
$$I_n=\int_0^1\frac{x-1}{x^{n+1}-1}dx$$
It makes sense to me that, for all values of $n$, $I_n$ is convergent since the bottom of the function is always above zero and the integral exists for $n\to\infty$ however I cannot seem to find a nice closed form for this.
One thought I did have was using:
$$\sum\ln(x_i)=\ln\left(\prod x_i\right)$$
but I cannot seem to make it work. Does anyone have any hints for this type of problem as I would like to try and complete it myself. Thanks :)
 [/INST] Making the problem more general
$$I_n=\int_0^t \frac {dx}{\sum_{k=0}^n x^k}=\int_0^t \frac {1-x}{1-x^{n+1}}\,dx$$
$$x=y^{\frac{1}{n+1}} \quad \implies \quad I_n=\frac 1{n+1}\int_0^{t^{n+1}} \frac{y^{-\frac{n}{n+1}}-y^{-\frac{n-1}{n+1}}} {1-y} \,dy$$ Using
$$\int \frac {y^a}{1-y}\,dy=\frac{y^{a+1} }{a+1}\,\, _2F_1(1,a+1;a+2;y)$$
$$\int_0^s \frac {y^a}{1-y}\,dy=B_s(a+1,0) \qquad \text{if} \qquad s<1\land a>-1$$
$$I_n=\frac 1{n+1}\Bigg[B_{t^{n+1}}\left(\frac{1}{n+1},0\right)-B_{t^{n+1}}\left(\frac{2}{n+1},0\right) \Bigg]$$
For the specific case where $t=1$,
$$I_n=\frac{\psi \left(\frac{2}{n+1}\right)-\psi \left(\frac{1}{n+1}\right)}{n+1}=\frac{H_{-\frac{n-1}{n+1}}-H_{-\frac{n}{n+1}}}{n+1}$$ If $n$ is large
$$I_n=\frac{1}{2}+\frac{\pi ^2}{6 n^2}-\frac{9 \zeta (3)+\pi^2
   }{3n^3}+\frac{810 \zeta (3)+45 \pi ^2+7 \pi ^4}{90 n^4}+O\left(\frac{1}{n^5}\right)$$
</s>