Asymptotic expansion at order 2 of $\int_0^1 \frac{x^n}{1+x} \, dx$ I'd like to get an asymptotic expansion of $\int_0^1 \frac{x^n}{1+x} \, dx$ at order two in $\frac{1}{n}$.
I'm able to prove that $$\lim\limits_{n \to \infty} n \int_0^1 \frac{x^n}{1+x} \, dx = \frac{1}{2}$$ which provides an asymptotic expansion at order $1$. How can I go one step further? Even better, is there a way to get an asymptotic expansion at any order $m$?
 A: First make the change of variables $x=e^{-s/n}$, so that
$$I(n)=n\int_0^1\frac{x^n dx}{1+x}=\int_0^{\infty}\frac{e^{-s}ds}{e^{s/n}+1}.$$
Now it suffices to Taylor expand in $\frac1n$ to any desired order. All the resulting integrals will be of the form $\alpha_k=\int_0^{\infty}s^{k}e^{-s}ds=k!$ and therefore are easily computable. In particular,
$$I(n)=\frac12-\frac1{4n}+\frac1{8n^3}+O\left(n^{-5}\right).$$
To write complete asymptotic expansion, it is helpful to notice that
$$\frac{1}{e^{s/n}+1}=\frac12\left(1-\tanh\frac s{2n}\right)=\frac12-\frac12\sum_{k=1}^{\infty}{\frac{2^{2k}(2^{2k}-1)B_{2k}}{(2k)!}}\left(\frac s{2n}\right)^{2k-1},$$
which implies that (here $B_k$ denote Bernoulli numbers)
$$I(n)=\frac12-\sum_{k=1}^{\infty}{\frac{(2^{2k}-1)B_{2k}}{2k}}n^{1-2k}.$$
A: Method 1.
An elementary approach.
You may just integrate by parts twice,
$$
\begin{align}
I_n&=\int_0^1\frac{x^n}{1+x}\:dx
\\&=\left. \frac{x^{n+1}}{(n+1)}\frac{1}{1+x}\right|_0^1+\frac{1}{(n+1)}\int_0^1\frac{x^{n+1}}{(x+1)^2}\:dx\\
&=\frac1{2(n+1)}+\frac{1}{n+1}\int_0^1\frac{x^{n+1}}{(x+1)^2}\:dx\\
&=\frac1{2(n+1)}+\frac{1}{n+1}\left(\left. \frac{x^{n+2}}{(n+2)}\frac{1}{(1+x)^2}\right|_0^1+\frac{2}{(n+1)}\int_0^1\frac{x^{n+1}}{(x+1)^3}\:dx \right)\\
&=\frac1{2(n+1)}+\frac1{4(n+1)(n+2)}+\frac{2}{(n+1)^2}\int_0^1\frac{x^{n+1}}{(x+1)^3}\:dx
\end{align}
$$ but
$$
0\leq \int_0^1\frac{x^{n+1}}{(x+1)^3}\:dx\leq\int_0^1x^{n+1}dx=\frac{1}{(n+2)} 
$$ thus
$$
\frac{2}{(n+1)^2}\int_0^1\frac{x^{n+1}}{(x+1)^3}\:dx=\mathcal{O}\left(\frac{1}{n^3} \right)
$$
Finally, as $n \to \infty$, 

$$ I_n=\int_0^1\frac{x^n}{1+x}dx=\frac1{2n}-\frac{1}{4n^2}+\mathcal{O}\left(\frac{1}{n^3} \right).$$ 

$$
$$
Method 2.
One may use the standard integral representation of the digamma function and its asymptotics, as $n \to \infty$, 

$$
\begin{align}
I_n=\int_0^1\frac{x^n}{1+x}\:dx&=\int_0^1\frac{x^n-x^{n+1}}{1-x^2}\:dx\\
&=\frac12\int_0^1\frac{(1-t^{n/2})-(1-t^{(n-1)/2})}{1-t}\:dt\\
&=\frac12\psi\left(\frac{n}{2}+1\right)-\frac12\psi\left(\frac{n}{2}+\frac12\right)\\
&=\frac1{2n}-\frac{1}{4n^2}+\mathcal{O}\left(\frac{1}{n^3} \right). 
\end{align}
$$

A: Consider $\,t:=x^n\,$ then the integral becomes 
\begin{align}
I(n)&:=\int_0^1 \frac{x^n}{1+x} \, dx\\
&=\int_0^1 \frac{t}{1+t^{1/n}} \frac{t^{1/n-1}}n\, dt\\
&=\frac 1n \int_0^1 \frac{t^{1/n}}{1+t^{1/n}}\, dt\\
\end{align}
You may expand $\,\dfrac{t^{1/n}}{n\;(1+t^{1/n})}\,$ in series as $n\to \infty$ (i.e. expand $e^{\log(t)/n}$) (faster with a CAS) :
$$\frac 1{2n}+\frac{\log(x)}{4n^2}-\frac{\log(x)^3}{48 n^4}+\cdots$$
and integration between $0$ and $1$ should return you :
$$\frac 1{2n}-\frac{1}{4n^2}+\frac{1}{8 n^4}-\cdots$$
(the integral of $\log(x)^n$ was given not long ago as $(-1)^n\,n!$)
Explicit solution:
The coefficients may be obtained from the generating function of the Bernoulli numbers so that the final result is simply :
$$I(n)\sim \sum_{k>0} \frac {1-2^{k}}{k}\frac{B_{k}}{n^k}$$
