<s>[INST] Proving $\int_0^1\frac{(1-t)^n}{(1+t)^{n+1}}dt = \frac{1}{2n} + O\left( \frac{1}{n^2}\right)$ 
The integral $\int_0^1\frac{(1-t)^n}{(1+t)^{n+1}}dt$ pops up when estimating the remainder of the series $\sum_{k} \frac{(-1)^k}k$.
Indeed, by Taylor's theorem with integral remainder, $$\log(1+x) = \sum_{k=1}^n (-1)^{k+1}\frac{x^k}{k} + \int_0^x \frac{(x-t)^n}{n!}\frac{(-1)^nn!}{(1+t)^{n+1}}dt$$
  For $x=1$, this yields $$\sum_{k=n+1}^\infty \frac{(-1)^{k+1}}k =(-1)^n\int_0^1\frac{(1-t)^n}{(1+t)^{n+1}}dt$$
Mathematica says that $\displaystyle \int_0^1\frac{(1-t)^n}{(1+t)^{n+1}}dt=\frac{1}{2n} + O\left( \frac{1}{n^2}\right)$. I'm wondering how this can be proved. 

Since $t\mapsto \frac{(1-t)^n}{(1+t)^{n+1}}$ converges pointwise to $\mathbb 1_{\{0\}}(t)$, the integral can be estimated by splitting it as $\int_0^{\epsilon_n} + \int_{\epsilon_n}^1$, for some $\epsilon_n$. However choosing the right $\epsilon_n$ seems difficult. I don't have any other approach in mind. 
 [/INST] Apply the substitution $u = \frac{1-t}{1+t}$ to notice that
$$ \int_{0}^{1} \frac{(1-t)^n}{(1+t)^{n+1}} \, dt
= \int_{0}^{1} \frac{u^n}{1+u} \, du. $$
Now integration by parts proves the desired estimates:
\begin{align*}
\int_{0}^{1} \frac{u^n}{1+u} \, du
&= \left[ \frac{u^{n+1}}{n+1} \cdot \frac{1}{1+u} \right]_{0}^{1}
+ \int_{0}^{1} \frac{u^{n+1}}{n+1} \cdot \frac{1}{(1+u)^2} \, du \\
&= \frac{1}{2(n+1)} + \mathcal{O}\left( \int_{0}^{1} \frac{u^{n+1}}{n+1} \, du \right) \\
&= \frac{1}{2n} + \mathcal{O}\left( \frac{1}{n^2} \right).
\end{align*}

Addendum. Generalizing this observation leads to the following convergent series representation:
\begin{align*}
\int_{0}^{1} \frac{u^n}{1+u} \, du
&= \frac{1}{2} \int_{0}^{1} \frac{u^n}{1 - \frac{1-u}{2}} \, du \\
&= \sum_{k=0}^{\infty} \frac{1}{2^{k+1}} \int_{0}^{1} u^n(1-u)^k \, du \\
&= \sum_{k=0}^{\infty} \frac{1}{2^{k+1}} \cdot \frac{k!}{(n+1)\cdots(n+k+1)}.
\end{align*}
</s>