Why the $\lim_{n\to\infty} (\frac{n}{n^2+1}+\frac{n}{n^2+4}+.....+\frac{n}{n^2+n^2})= \frac{\pi}{4}$? Why the $\lim_{n\to\infty} (\frac{n}{n^2+1}+\frac{n}{n^2+4}+.....+\frac{n}{n^2+n^2})= \frac{\pi}{4}$?
I read somewhere that it is related to $f(x)=\frac{1}{1+x^2}$ but dont know why...

$$\sum_{i=1}^n \dfrac{n}{n^2+i^2}=\sum_{i=1}^n \dfrac{n^2}{n^2+i^2}\dfrac{1}{n}=\sum_{i=1}^n \dfrac{1}{1+(0+i/n)^2}\dfrac{1}{n}$$
Now reimagine: $\Delta x = \dfrac{1-0}{n}, x_i = 0+i\Delta x = \dfrac{i}{n}$
Then your sum is equal to
$$\sum_{i=1}^{n} f(x_i) \Delta x$$
Now take the limit as $n\to\infty$
