# Estimate sum with a very small error

Estimate sum: $$\sum_{i=1}^{n}\frac{i}{n^2+i}$$ with an absolute error $O\left(\frac{1}{n^2}\right)$

So far, estimation with integrals was sufficient for me, but here the error has to be very small and I don't know how to approach.

-

By Taylor expansion the summand is $$\frac{i}{n^2} - \frac{i^2}{n^4} + O\bigg(\frac{i^3}{n^6}\bigg).$$
Summing this over $i$ gives $n(n+1)/2n^2 - n(n+1)(2n+1)/6n^4$ with an absolute error of $O\big(\tfrac{n^4}{n^6}\big)$.
Absorbing small terms into the error term gives the simpler expression $\frac12 + \frac1{6n} + O(n^{-2})$.