Asymptotic estimate of integral $\int_{0}^{r}\frac{dx}{\sum_{k=0}^{l}x^k}$ Let $l\in \mathbb{N}^{+}$ and consider the integral
$$ I(r)=\int_{0}^{r}\frac{dx}{\sum_{k=0}^{l}x^k} $$
I want to know how to estimate the behavior of $I(r)$ for $r\to +\infty$.  By AM-GM inequality, I get
$$ I(r)\approx \int_{0}^{r}\frac{dx}{1+x^l},  $$
then I stuck here. Can someone help me? Thank you very much!
 A: For $n>2$ (the cases $n=1$ and $n=2$ are easy), let $$I_n(r)=\int_0^r\frac{dx}{1+x+\ldots+x^{n-1}}=\int_0^r\frac{1-x}{1-x^n}\,dx.$$ With the help of $f(a):=\int_0^1\frac{y^{a-1}-y^{-a}}{1-y}\,dy=\pi\cot a\pi$ for $0<a<1$ (see e.g. this), $$I_n(+\infty)=\int_0^1\frac{1-x}{1-x^n}\,dx+\int_0^1\frac{1-x^{-1}}{1-x^{-n}}\frac{dx}{x^2}=\frac1n\left[f\Big(\frac1n\Big)-f\Big(\frac2n\Big)\right]=\frac{\pi}{n}\csc\frac{2\pi}{n},$$ and for $r>1$ $$I_n(+\infty)-I_n(r)=\int_r^{+\infty}\sum_{k=1}^\infty(x-1)x^{-nk}\,dx=\sum_{k=1}^\infty\left(\frac{r^{2-nk}}{nk-2}-\frac{r^{1-nk}}{nk-1}\right)$$ (thus, we have an exact expansion in negative powers of $r$, not only an asymptotic one).
A: Too long for a comment.
One of my Ph.D. students worked this problem more then $30$ years ago and, playing for sure with the roots of unity, arrived for
$$I_n=\int_{0}^{\infty}\frac{dx}{\sum_{k=0}^{n}x^k}$$ to the simple
$$I_n=\cos \left(\frac{\pi }{n+1}\right)\, \Gamma \left(\frac{n}{n+1}\right)\, \Gamma\left(\frac{n+2}{n+1}\right)-$$
$$\frac{1}{2} \,\cos \left(\frac{2 \pi }{n+1}\right)\,
   \Gamma \left(\frac{n-1}{n+1}\right)\, \Gamma \left(\frac{n+3}{n+1}\right)$$
I have not been able to find the intermediate steps.
From here, the expansions are very simple.
$$I_n=\frac{1}{2}+\frac{\pi ^2}{3 n^2}-\frac{2 \pi ^2}{3 n^3}+\frac{\pi ^2 \left(45+7 \pi ^2\right)}{45 n^4}-\frac{4 \pi ^2 \left(15+7 \pi ^2\right)}{45
   n^5}+O\left(\frac{1}{n^6}\right)$$ Using the above, the relative error is $<1$% for $n>5$,   $<0.1$% for $n>8$,   $<0.01$% for $n>12$.
