Limit of the series $\sum_{k=1}^\infty \frac{n}{n^2+k^2}.$ I am trying to evaluate $$\lim_{n\to \infty} \sum_{k=1}^\infty \frac{n}{n^2+k^2}.$$ Now I am aware that clearly $$\lim_{n\to \infty} \sum_{k=1}^n \frac{n}{n^2+k^2} = \int_0^1 \frac{1}{1+x^2}dx = \tan^{-1}(1) = \frac{\pi}{4},$$ but I do not know what to do if each sum is already sent to infinity. Im taking a limit of limits. I suppose I could rewrite my limit as $$\lim_{n\to \infty} \lim_{m\to \infty} \sum_{k=1}^m \frac{n}{n^2+k^2}?$$ But I am unaware if this is helpful at all. Any hints would be appreciated. Obviously, Wolfram calculates this as $\frac{\pi}{2}$ but I am unaware of the steps and logic to get there.
 A: Denote $\displaystyle \mathcal{S}(n) = \sum_{k \ge 1} \frac{n}{n^2+k^2}$. We have
\begin{aligned} \mathcal{S}(n) & = \sum_{k\geq 1}\frac{n}{ n^2+k^2} \\& = \frac{1}{2}\sum_{k\geq 1}\frac{2n }{ n^2+k^2}  \\& = \frac{1}{2}\sum_{k\geq 1} \frac{d}{dn}\log\left(1+\frac{n^2}{k^2}\right) \\& = \frac{1}{2}\frac{d}{dn}  \log \prod_{k\geq 1}\left(1+\frac{n^2}{k^2}\right) \\& = \frac{1}{2}\frac{d}{dn}  \bigg[\log \pi n\prod_{k\geq 1}\left(1+\frac{n^2}{k^2}\right)- \log(\pi n)\bigg] \\& = \frac{1}{2}\frac{d}{dn}  \log \pi n \prod_{k\geq 1}\left(1+\frac{n^2}{k^2}\right)-\frac{1}{2 n}\end{aligned}
Weierstrass factorization for hyperbolic sine is:
$$\sinh \pi z=\pi z \prod_{k=1}^\infty\left(1+\frac{z^2}{k^2}\right)$$
Therefore \begin{aligned} \mathcal{S}(n) & = \frac{1}{2} \frac{d}{dn} \log \sinh \pi n -\frac{1}{2 n} \\&= \frac{1}{2}\pi \coth(n \pi)-\frac{1}{2 n } \end{aligned}
And finally taking the limit as $n \to \infty$
\begin{aligned} \lim_{n \to \infty} \mathcal{S}(n) &= \lim_{n \to \infty} \bigg(\frac{1}{2}\pi \coth(n \pi)-\frac{1}{2 n }\bigg) \\& = \frac{\pi}{2}.\end{aligned}
A: Let $f(x)= \dfrac{1}{1+x^2}.$ Note that our sum equals
$$\sum_{k=1}^{\infty}f\left(\frac{k}{n}\right)\frac{1}{n}.$$
Now $f$ decreases from $1$ to $0$ on $[0,\infty).$ Thus, for $k=1,2,\dots,$
$$\int_{k/n}^{(k+1)/n}f\le f\left(\frac{k}{n}\right)\frac{1}{n} \le \int_{(k-1)/n}^{k/n}f.$$
Summing on $k$ then gives
$$\int_{1/n}^\infty f(x)\,dx \le \sum_{k=1}^{\infty}f\left(\frac{k}{n}\right)\frac{1}{n}\le \int_0^\infty f(x)\,dx.$$
This is true for any $n.$ As $n\to \infty,$ the integral on the left approaches $\int_0^\infty f(x)\,dx.$ By the squeeze theorem, the limit of our sum equals the value of this integral, which is $\pi/2.$
A: Let $$f(x):= \frac{1}{1+x^2}$$
then
$$\sum_{k=1}^{\infty} \frac{n}{n^2+x^2} = \int_{0}^{+\infty} f\left( \frac{ \lceil nx \rceil }{n} \right) dx$$
From this you can do whatever you like to conclude, maybe using DCT while knowing that $$f\left( \frac{ \lceil nx \rceil }{n} \right) \le f(x) \quad \forall n \quad \text{and } \int_{0}^{\infty} f(x)dx <+\infty$$
for a direct conclusion.
Edit:  It's probable that you haven't learnt DCT yet, so here is an alternative
If $0 \le x \le y$, we see that:
$$ 0 \le f(x)-f(y) = \frac{(y-x)(y+x)}{(1+y^2)(1+x^2)} \le \frac{y-x}{1+x^2}=(y-x)f(x)$$
Thus for all $x>0$
$$0 \le f(x)- f\left( \frac{ \lceil nx \rceil }{n} \right) \le \left( \frac{ \lceil nx \rceil }{n} -x\right)f(x) \le \frac{1}{n}f(x)  $$
So
$$\int_{0}^{\infty} f(x)dx \ge \int_{0}^{\infty} f\left( \frac{ \lceil nx \rceil }{n} \right)dx \ge (1-\frac{1}{n})\int_{0}^{\infty} f(x)dx $$
Hence forth the conclusion
A: Another solution.
$$\frac{n}{n^2+k^2}=\frac{n}{(k+in)(k-in)}$$ Using partial fraction decomposition and summing
$$S_m=\sum_{k=1}^m\frac{n}{n^2+k^2}=\frac{i}{2}  (\psi(m+i n+1)-\psi (m-i n+1)+\psi (1-i n)-\psi (1+i n))$$
$$\psi (1-i n)-\psi (1+i n)=i \left(\frac{1}{n}-\pi  \coth (\pi  n)\right)$$
$$\psi(m+i n+1)-\psi (m-i n+1)=H_{m+i n}-H_{m-i n}$$
Using the asymptotic of generalized harmonic numbers
$$H_{m+i n}-H_{m-i n}=\frac{2 i n}{m}-\frac{i n}{m^2}+O\left(\frac{1}{m^3}\right)$$ Combining all the above
$$S_m=\frac{\pi  n \coth (\pi  n)-1}{2 n}-\frac{n}{m}+\frac{n}{2 m^2}+O\left(\frac{1}{m^3}\right)$$
$$\lim_{m\to \infty} S_m=\frac{\pi  n \coth (\pi  n)-1}{2 n}=\frac{\pi}{2}   \coth (\pi  n)-\frac{1}{2 n}$$
$$\lim_{n\to \infty} \lim_{m\to \infty} \sum_{k=1}^m \frac{n}{n^2+k^2}=\lim_{n\to \infty} \frac{\pi  n \coth (\pi  n)-1}{2 n}=\frac \pi 2$$
