Find $\lim_{n\to\infty} \left(\frac{n}{1+n^2}+\frac{n}{4+n^2}+\cdots+ \frac{n}{n^2+n^2}\right)$ $$\lim_{n\to\infty} \left(\frac{n}{1+n^2}+\frac{n}{4+n^2}+\cdots+ \frac{n}{n^2+n^2}\right)$$
I will give my solution, which, to my surprise, turned out to be erroneous:
$S_n=\frac{a_1+a_n}{2}n=\frac{\frac{n}{1+n^2}+\frac{n}{n^2+n^2}}{2}n=\frac{1}{4}\frac{3n^2+1}{1+n^2}$
$\lim_{n\to\infty}S_n=\frac{3}{4}$
But the correct answer is $\frac{\pi}{4}$
I do not understand how to get the exact answer.

Hint:
You can rewrite it as a Riemann sum:
$$\sum_{k=1}^n\frac{n}{n^2+k^2}=\sum_{k=1}^n\frac{n}{n^2\Bigl(1+\frac{k^2}{n^2}\Bigr)}=\frac1n\sum_{k=1}^n\frac{1}{1+\frac{k^2}{n^2}}.$$
Can you proceed?
