# Convert Riemann sum to definite integral: $\sum_{i = 1}^n \frac{n}{n^2 + i^2}$

I am having trouble with this problem. Basically, I am given a Riemann sum and I have to rearrange it so that I can deduce the definite integral that it is equivalent to. Thank you.

$$\lim_{n \to \infty} \sum_{i = 1}^n \frac{n}{n^2 + i^2}$$

• Please use MathJax formating – Shailesh Feb 4 '16 at 4:34

You may use the fact that, for any continuous function $f$ over $[0,1]$, as $n \to \infty$, we have $$\frac{1}{n} \sum_{i=0}^n f\left(\frac{i}{n}\right) \longrightarrow \color{#3333cc}{\int_0^1f(x)\:dx}.$$ Applying it to $$f(x)=\frac1{1+x^2},$$ gives, as $n \to \infty$, $$\sum_{i=1}^n\frac{n}{n^2+i^2}=\frac1n\sum_{i=1}^n\frac1{1+(i/n)^2} \longrightarrow \color{#3333cc}{\int_0^1\frac1{1+x^2}\:dx}=\arctan 1 =\color{#3333cc}{\frac{\pi}4}.$$