Asymptotic expansion of $I_n=\int_{0}^{1}\frac{1}{1+x^n} dx$

The problem is to find the asymptotic expansion of $I_n=\int_{0}^{1}\frac{1}{1+x^n} dx$ (at least the first 3 terms).

By using some simple bounding, I first showed that $I_n$ tends to $1$. Then I calculated the limit $n(1-I_n)$ using integration by parts and some more bounding. At the end I found:

$I_n=1-\frac{\ln(2)}{n}+o(\frac{1}{n})$

I guess there is another way to find this result by invoking the expansion of $\frac{1}{1+x^n}$. This is more annoying, because you have to justify that you can switch the integral inside and the infinite sum, and at the end you will get the following sum

$I_n\stackrel{?}{=}\sum_{k=0}^{\infty}\frac{(-1)^{k}}{kn+1}=1-\frac{1}{n}\sum_{k=1}^{\infty}\frac{(-1)^{k+1}}{k+\frac{1}{n}}$

In this case, one has to justify that the little $\frac{1}{n}$ doesn't create any problems and that we have in fact:

$\lim_{n \to \infty} \sum_{k=1}^{\infty}\frac{(-1)^{k+1}}{k+\frac{1}{n}}\stackrel{?}{=}\sum_{k=1}^{\infty}\frac{(-1)^{k+1}}{k}=\ln(2)$

So my question is if the second approach can be made rigorous, and how can we find the third term in the asymptotic expansion of $I_n$? Also, is there a standard method to solve these types of problems?


The second approach can be made rigorous: For every partial sum we have

$$0 \leqslant \sum_{k = 0}^m (-1)^k x^{kn} \leqslant 1,$$

since $0 \leqslant x^{(k+1)n} \leqslant x^{kn} \leqslant 1$ for $x\in [0,1]$ and all $k\in \mathbb{N}$ if $n > 0$. If you can use it, just mumble "dominated convergence", and if you're dealing with Riemann integrals, combine the global boundedness with the uniform convergence on $[0,1-\varepsilon]$ for every $\varepsilon > 0$ to justify

$$I_n = \sum_{k = 0}^{\infty} \frac{(-1)^k}{kn+1} = 1 - \sum_{k = 1}^{\infty} \frac{(-1)^{k+1}}{kn+1}.$$

Now we can approximate the $\frac{1}{kn+1}$ with the simpler to handle $\frac{1}{kn}$:

$$I_n = 1 - \sum_{k = 1}^{\infty} \frac{(-1)^{k+1}}{kn} + \sum_{k = 1}^{\infty} (-1)^{k+1}\biggl(\frac{1}{kn} - \frac{1}{kn+1}\biggr).$$

We know that the first series evaluates to $\frac{\ln 2}{n}$, and the remaining sum can be handled similarly:

$$\frac{1}{kn} - \frac{1}{kn+1} = \frac{1}{kn(kn+1)} = \frac{1}{(kn)^2} - \frac{1}{(kn)^2(kn+1)},$$

and

$$\sum_{k = 1}^{\infty} \frac{(-1)^{k+1}}{(kn)^2} = \frac{\pi^2}{12n^2}$$

gives the next term in the expansion.

This can be continued as far as one desires, leading to

$$I:n = 1 - \frac{\ln 2}{n} + \sum_{m = 2}^{\infty} (-1)^m\bigl(1-2^{1-m}\bigr)\frac{\zeta(m)}{n^m}.$$


Note that we can write

$$\begin{align} I_n&=\int_0^1\frac{1}{1+x^n}\,dx\\\\ &=1-\frac1n\int_0^1\frac{x^{1/n}}{1+x}\,dx\tag 1 \end{align}$$


The first methodology in the OP is quite a tenable way forward. Here, we use successive integration by parts to obtain the full asymptotic series in reciprocal powers of $n$.

Integrating by parts the integral on the right-hand side of $(1)$ with $u=x^{1/n}$ and $v=\log(1+x)$, we obtain

$$I_n=1-\frac{\log(2)}{n}+\frac1{n^2}\int_0^1 x^{1/n}\frac{\log(1+x)}{x}\,dx \tag2 $$

Then, integrating by parts the integral on the right-hand side of $(2)$, we obtain

$$\begin{align} I_n&=1-\frac{\log(2)}{n}+\frac1{n^2}\underbrace{\int_0^1 \frac{\log(1+x)}{x}\,dx}_{\eta(2)=-\text{Li}_2(-1)=\pi^2/12}-\frac1{n^3}\int_0^1 x^{-1+1/n}\underbrace{\int_0^x \frac{\log(1+x')}{x'}\,dx'}_{\log(1+x) \le -\text{Li}_2(-x)\le x}\,dx\\\\ &=1-\frac{\log(2)}{n}+\frac{\pi^2}{12n^2}+O\left(\frac{1}{n^3}\right) \end{align}$$

One can continue to integrate by parts by introducing higher order polylogarithm functions $-\text{Li}_\ell(-1)=\eta(\ell)$, in terms of the Dirichlet Eta function. The full result is

$$I_n=1-\frac{\log(2)}{n}+\sum_{k=2}^\infty \frac{(-1)^{k}\eta(k)}{n^k}$$

which agrees with the result reported by @DanielFischer.


PART $2$: I thought it would be a useful complement to Daniel Fischer's post to present the details regarding the interchange of operations. To that end, we proceed.

Note that we have for $n\ge 1$

$$\begin{align} I_n&=\int_0^1 \frac{1}{1+x^n}\,dx\\\\ &\int_0^1 \sum_{k=0}^\infty (-1)^kx^{nk}\,dx\\\\ &=\lim_{\delta\to 0^+}\int_0^{1-\delta}\sum_{k=0}^\infty (-1)^kx^{nk}\,dx\tag3 \end{align}$$

Since the series in $(3)$ converges uniformly on $[0,1-\delta]$ for $0<\delta<1]$, we can interchange the order of integration with the series to obtain

$$\begin{align} I_n&=\lim_{\delta\to 0^+}\sum_{k=0}^\infty (-1)^k\int_0^{1-\delta}x^{nk}\,dx\\\\ &=\lim_{\delta\to 0^+}\sum_{k=0}^\infty \frac{(-1)^k(1-\delta)^{nk+1}}{1+nk} \tag 4 \end{align}$$

For each $n$, we have $\left|\sum_{k=1}^N (-1)^k\right|\le 1$ for all $N$, $\frac{(1-\delta)^{1+nk}}{1+nk}$ is monotonic for each $\delta \in [0,1]$, and $\frac{(1-\delta)^{1+nk}}{1+nk}\to 0$ uniformly for $\delta\in[0,1]$.

Applying Dirichlet's Test for Uniform Convergence, we find that the series in $(4)$ converges uniformly for $\delta\in [0,1]$. And inasmuch as $\frac{(-1)^k(1-\delta)^{1+nk}}{1+nk}$ is a continuous function of $\delta$, then the series is also continuous and we may interchange the limit and the series to arrive at the coveted result

$$I_n=\sum_{k=0}^\infty\frac{(-1)^k}{1+nk}$$