To find the sum of this series I need to find the sum of this series $$
\frac{n}{n^2}+\frac{n}{n^2+1^2}+\frac{n}{n^2+2^2}+\ldots+\frac{n}{n^2+(n-1)^2}
$$
Here general term $=\frac{n}{n^2+r^2}, r=0,1,2, \ldots$
$$
\begin{aligned}
& =\frac{1}{n}\left[\frac{1}{1+\left(\frac{r}{n}\right)^2}\right]  \\
& =\frac{d x}{1+x^2}\left[\text { Replace } \frac{1}{n} \text { by } d x \text { and } \frac{r}{n} \text { by } x\right]
\end{aligned}
$$
Required sum $=\int_0^1 \frac{d x}{1+x^2}=\left.\tan ^{-1} x\right|_0 ^1=\frac{\pi}{4}$
In this how to get the lower limit and upper limit values $0$ and $1$ respectively ???
Thanks in advance.
 A: Recall that e.g. the left-endpoint Riemann sum is given by
$$L_n = \sum_{i=1}^n f(\ell_i) \Delta x_i$$
where $\ell_i$ denotes the left endpoint of the $i^{\rm th}$ subinterval in the partition of the interval over which the integral is being taken, and $\Delta x_i$ is the length of the $i^{\rm th}$ subinterval. The same conclusions can be drawn from any choice of partition, but the choice of left/right endpoints for sampling makes things easier to understand.
Let $[a,b]$ be the domain of integration. If we consider $n$ equally-spaced subintervals, so $\Delta x_i=\frac{b-a}n$, we choose the partition
$$\left[a, a+\frac{b-a}n\right] \cup \left[a+\frac{b-a}n, a+\frac{2(b-a)}n\right] \cup \cdots \cup \left[a+\frac{(n-1)(b-a)}n,b\right]$$
so that the left endpoints are governed by an arithmetic sequence; for $1\le i\le n$,
$$\ell_i = a + \frac{(i-1)(b-a)}n$$
Plugging this into the sum, we have
$$L_n = \frac{b-a}n \sum_{i=1}^n f\left(a + \frac{(i-1)(b-a)}n\right)$$
Now at either extreme,

*

*if $i=1$, then the least left endpoint is $a$

*if $i=n$, then the greatest left endpoint is $a+\frac{(n-1)(b-a)}n$, which approaches $b$ as $n\to\infty$
Comparing this to your sum,
$$L_n = \frac1n \sum_{i=1}^n \frac1{1+\left(\frac in\right)^2}$$
it's not too far a leap to identify $f(x)=\frac1{1+x^2}$ and $[a,b]=[0,1]$. We must have $b-a=1$, and since we supply a lone $\frac in$ term to $f$, it follows that $a=0$ and $b=1$.
(There is of course a subtle but ultimately innocuous difference here in that I use $1\le i\le n$ and you have $0\le r\le n-1$, but the subinterval count is consistent.)
A: Upper limit= $\lim_{n\to\infty} \frac{n}{n}$,
Lower limit= $\lim_{n\to\infty} \frac{0}{n}$.
That gives $1$ and $0$.
In general if this type of sum comes up with the lower limit being $a_n$ and upper being $ b_n$. Then Upper limit of integral = $\lim_{n\to\infty} \frac{b_n}{n}$,
Lower limit of integral = $\lim_{n\to\infty} \frac{a_n}{n}$.
