<s>[INST] 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.
 [/INST] Divide  the general term $\dfrac{n}{k^2+n^2}$ by $n^2$ we have : $\dfrac{1}{n}\cdot \dfrac{1}{1+ \frac{k^2}{n^2}} \to \displaystyle \int_{0}^{1} \dfrac{dx}{1+x^2}= \dfrac{\pi}{4}$ .
</s>