<s>[INST] Calculate the Limit of Double Sum Compute
\begin{equation}
L=\lim _{n \rightarrow \infty}\frac{1}{n} \sum_{a=1}^n \sum_{b=1}^n \frac{a}{a^2+b^2 }.
\end{equation}
My attempt:
Define \begin{equation} f(n,m)= \frac{1}{n} \sum_{a=1}^n \frac{1}{m}\sum_{b=1}^m \frac{\frac{a}{n}}{(\frac{a}{n})^2+(\frac{b}{m})^2 } = \frac{1}{m}\sum_{b=1}^m \frac{1}{n} \sum_{a=1}^n \frac{\frac{a}{n}}{(\frac{a}{n})^2+(\frac{b}{m})^2 }
\end{equation}
Now for any $\epsilon >0$ there exists some $B>0$ such that for any $n,m \in \mathbb{N}$ and $n,m\geq B$:
\begin{equation}
|f(n,m)-f(n,n)|<\epsilon
\end{equation}
Thus, we have \begin{equation}
L=\lim _{n \rightarrow \infty} f(n,n)=\lim _{m \rightarrow \infty} \lim _{n \rightarrow \infty} f(n,m)= \lim _{m \rightarrow \infty} \frac{1}{m}\sum_{b=1}^m \int_{0}^{1}\frac{x}{x^2+(\frac{b}{m})^2}dx=\\ \frac{1}{2}\lim _{m \rightarrow \infty} \frac{1}{m}\sum_{b=1}^m \ln\frac{1+(\frac{b}{m})^2}{(\frac{b}{m})^2}=\frac{1}{2}\int_{0}^{1}\ln\frac{1+x^2}{x^2}dx=\frac{2\ln2 +\pi}{4}
\end{equation}
 [/INST] While this approach arrives at the correct value for the limit it is not easily justified.
At first glance,
$$f(n,n) = \frac{1}{n}\sum_{a=1}^n\sum_{b=1}^n\frac{a}{a^2 + b^2} = \frac{1}{n^2}\sum_{a=1}^n\sum_{b=1}^n\frac{a/n}{(a/n)^2 + (b/n)^2} $$
is a Riemann sum for the integral of $g:(x,y) \mapsto \frac{x}{x^2+ y^2}$ over $[0,1]\times[0,1]$.  However, the integrand is unbounded around $(0,0)$ and is not Riemann integrable.  Instead it must be considered as an improper integral which can be evaluated as an iterated integral
$$I = \int_0^1 \left(\int_0^1 \frac{x}{x^2 + y^2} \, dy\right )dx = \frac{2 \log 2 + \pi}{4}$$
Note that the inner integral is properly Riemann and we can write
$$I = \int_0^1 \lim_{m \to \infty} \left(\frac{1}{m}\sum_{b=1}^m \frac{x}{x^2 + (b/m)^2} \right)\, dx$$
At this point it would be nice to switch the integral and the limit and apply a second Riemann sum to obtain
$$I =  \lim_{m \to \infty} \frac{1}{m}\sum_{b=1}^m \int_0^1\frac{x}{x^2 + (b/m)^2} \, dx =  \lim_{m \to \infty} \left(\frac{1}{m}\lim_{n \to \infty} \frac{1}{n}\sum_{a=1}^n\sum_{b=1}^m \frac{a/n}{(a/n)^2 + (b/m)^2}\right)$$
However justifying that switch is not obvious.  For example, we see immediately that
$$\left|\frac{1}{m}\sum_{b=1}^m \frac{x}{x^2 + (b/m)^2} \right| \leqslant \frac{1}{m}\sum_{b=1}^m \frac{x}{x^2 } = \frac{1}{x},$$
but the dominating function $x \mapsto 1/x$ is not integrable on $[0,1]$.
Furthermore, there remains finding the justification for  $\lim_{n\to \infty} f(n,n) = \lim_{m\to \infty} \lim_{n\to \infty} f(n,m)$.

A easily justified approach is to apply the Stolz-Cesaro theorem to get
$$\lim_{n \to \infty} f(n,n) = \lim_{n \to \infty} \frac{\sum_{a=1}^{n+1}\sum_{b=1}^{n+1}\frac{a}{a^2 + b^2} - \sum_{a=1}^n\sum_{b=1}^n\frac{a}{a^2 + b^2} }{n+1 - n} \\ = \lim_{n \to \infty} \left(\frac{n+1}{(n+1)^2 + (n+1)^2}+ \sum_{a=1}^n \frac{a}{a^2 + (n+1)^2} + \sum_{b=1}^n \frac{n+1}{(n+1)^2 + b^2} \right) \\ = \lim_{n\to \infty} \sum_{a=1}^{n} \frac{a + n+1}{a^2 + (n+1)^2}  = \lim_{n\to \infty} \frac{1}{n+1}\sum_{a=1}^{n} \frac{1 + \frac{a}{n+1}}{1 + \left(\frac{a}{n+1}\right)^2}\\ = \int_0^1 \frac{1+x}{1+x^2} \, dx = \frac{2 \log 2 + \pi}{4}$$
</s>