How find $a,b$ if $\int_{0}^{1}\frac{x^{n-1}}{1+x}dx=\frac{a}{n}+\frac{b}{n^2}+o(\frac{1}{n^2}),n\to \infty$ let
$$\int_{0}^{1}\dfrac{x^{n-1}}{1+x}dx=\dfrac{a}{n}+\dfrac{b}{n^2}+o(\dfrac{1}{n^2}),n\to \infty$$
Find the $a,b$
$$\dfrac{x^{n-1}}{1+x}=x^{n-1}(1-x+x^2-x^3+\cdots)=x^{n-1}-x^n+\cdots$$
so
$$\int_{0}^{1}\dfrac{x^{n-1}}{1+x}=\dfrac{1}{n}-\dfrac{1}{n+1}+\dfrac{1}{n+2}-\cdots$$
and note
$$\dfrac{1}{n+1}=\dfrac{1}{n}\left(\frac{1}{1+\dfrac{1}{n}}\right)=\dfrac{1}{n}-\dfrac{1}{n^2}+\dfrac{1}{n^3}+o(1/n^3)$$
and simaler
$$\dfrac{1}{n+2}=\dfrac{1}{n}-\dfrac{2}{n^2}+o(1/n^2)$$
$$\dfrac{1}{n+3}=\dfrac{1}{n}-\dfrac{3}{n^2}+o(1/n^2)$$
then which term end?
 A: Here's a possible to find the coefficients:
From 
$$
n\int_0^1 \frac{x^{n-1}}{1+x} d\;x =\left[\frac{x^n}{1+x} \right]^1_0 + \int_0^1 \frac{x^n}{(1+x)^2} d\;x =1/2 + \int_0^1 \frac{x^n}{(1+x)^2} d\;x 
$$
Since the last term tends to zero as $n$ increases, we get $a =1/2$.
The same process allows to determine $b$.
A: $\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\dsc}[1]{\displaystyle{\color{red}{#1}}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\Li}[1]{\,{\rm Li}_{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
\begin{align}
\int_{0}^{1}{x^{n - 1} \over 1 + x}\,\dd x&
=\sum_{k\ =\ 0}^{\infty}\pars{-1}^{k}\int_{0}^{1}x^{n - 1 + k}\,\dd x
=\sum_{k\ =\ 0}^{\infty}{\pars{-1}^{k} \over n + k}
=\sum_{k\ =\ 0}^{\infty}\pars{{1 \over 2k + n} - {1 \over 2k + 1 + n}}
\\[5mm]&={1 \over 4}\sum_{k\ =\ 0}^{\infty}
{1 \over \bracks{k + \pars{n + 1}/2}\pars{k + n/2}}
=\half\bracks{\Psi\pars{n + 1 \over 2} - \Psi\pars{n \over 2}}
\end{align}

where $\ds{\Psi}$ is the Digamma Function.

Then,
\begin{align}
\color{#66f}{\large a}&=\lim_{n\ \to\ \infty}
n\braces{\half\bracks{\Psi\pars{n + 1 \over 2} - \Psi\pars{n \over 2}}}
=\color{#66f}{\large\half}
\\[5mm]
\color{#66f}{\large b}&=\lim_{n\ \to\ \infty}
n^{2}\braces{
\half\bracks{\Psi\pars{n + 1 \over 2} - \Psi\pars{n \over 2}} - {1 \over 2n}}
=\color{#66f}{\large{1 \over 4}}
\end{align}
A: Thank you,I have use two parts integral following
$$\int_{0}^{1}x^nf(x)dx=\dfrac{f(1)}{n}-\dfrac{f(1)+f'(1)}{n^2}+o(1/n^2)$$
where $f\in C^{2}[0,1]$
$$I=\int_{0}^{1}f(x)d\dfrac{x^{n+1}}{n+1}=\dfrac{f(1)}{n+1}-\dfrac{1}{n+1}\int_{0}^{1}f'(x)d\dfrac{x^{n+2}}{n+2}$$
so
$$I=\dfrac{f(1)}{n+1}-\dfrac{f'(1)}{(n+1)(n+2)}+\dfrac{f''(\xi)}{(n+1)(n+2)(n+3)},0<\xi<1$$
since
$$\dfrac{f''(\xi)}{(n+1)(n+2)(n+3)}=c/n^3+o(1/n^3)=o(1/n^2),n\to \infty$$
and
$$\dfrac{1}{n+1}=\dfrac{1}{n}-\dfrac{1}{n^2}+o(1/n^2)$$
$$\dfrac{1}{(n+1)(n+2)}=\left(\dfrac{1}{n}-\dfrac{1}{n^2}+o(1/n^2)\right)\left(\dfrac{1}{n}-\dfrac{2}{n^2}+o(1/n^2)\right)=\dfrac{1}{n^2}+o(1/n^2)$$
so
$$\int_{0}^{1}x^nf(x)dx=\dfrac{f(1)}{n}-\dfrac{f(1)+f'(1)}{n^2}+o(1/n^2)$$
