Evaluating $ \lim_{n\to\infty}\sum_{i=0}^n\frac{n}{n^2+i^2} $ A few days ago I confronted with this limit question, and all my attempts to solve it failed somehow.
$$
\lim_{n\to\infty}\sum_{i=0}^n\frac{1}{n^2+i^2}
$$
I feel I should relate it to $\arctan(n)$. I tried integration and derivation to reach to my point, it went well at first but eventually nowhere.
Any advice or idea would be appreciated.
$$
\sum_{i=0}^n\frac{1}{n^2+i^2} = \frac 1 n \sum_{i=0}^n \frac 1 {1 + \left( \frac i n \right)^2} \cdot \frac 1 n = \frac 1 n \sum_{i=0}^n \arctan'\left( \tfrac i n \right)\cdot \tfrac 1 n
$$
That last sum is a Riemann sum that approximates $\displaystyle\int_0^1 \arctan'(x)\,dx = \arctan 1 - \arctan 0 = \frac \pi 4,$ but outside the sum there is a factor of $1/n$ that approaches $0,$ so ultimately the limit is $0.$
$$
\begin{aligned}
\sum_{0\le i\le n}{1\over n^2+i^2}
&amp;={1\over n^2}+\sum_{1\le i\le n}{1\over n^2+i^2} \\
&amp;={1\over n^2}+\int_{1-\varepsilon}^n \,{\mathrm d\lfloor t\rfloor\over n^2+t^2} \\
&amp;={1\over n^2}+\left.{\lfloor t\rfloor\over n^2+t^2}\right|_{1-\varepsilon}^n-\int_1^n[t-\{t\}] \, \mathrm d\left(1\over n^2+t^2\right) \\
&amp;={1\over n^2}+{1\over2n}-\int_1^nt \, \mathrm d\left(1\over n^2+t^2\right)+\int_1^n\{t\} \, \mathrm d\left(1\over n^2+t^2\right) \\
\end{aligned}
$$
wherein the integrals are evaluated as follows
$$
\begin{aligned}
\int_1^nt \, \mathrm d\left(1\over n^2+t^2\right)
&amp;=\left.{t\over n^2+t^2}\right|_1^n-\int_1^n \, {\mathrm dt\over n^2+t^2} \\
&amp;={1\over2n}-{1\over n^2+1}-\left.{1\over n}\arctan\left(\frac tn\right)\right|_1^n \\
&amp;={1\over2n}-{1\over n^2+1}-{\pi\over4n}+\frac1n\arctan\left(\frac1n\right) \\
&amp;=\mathcal O\left(\frac1n\right)
\end{aligned}
$$
$$
\int_1^n\{t\} \, \mathrm d\left(1\over n^2+t^2\right)=\mathcal O\left(\frac1n\right)
$$
As a result, we have
$$
\sum_{0\le i\le n}{1\over n^2+i^2}=\mathcal O \left(\frac1n\right)
$$