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}.$$