Solution (source code)

= Solution

Write the sum in the question as the right <Riemann sum>
$$
S_N=\sum_{j=1}^N\frac{N}{N^2+j^2}
=\frac1N\sum_{j=1}^N\frac{1}{1+(j/N)^2}.
$$
Relative to the <composite trapezoidal rule>, the only change is in the two endpoint weights:
$$
S_N-T_N=\frac{1}{2N}\bigl(f(1)-f(0)\bigr)=-\frac1{4N}.
$$
The <integrand> $f(x)=1/(1+x^2)$ is <continuous> on $[0,1]$, so $T_N\to I$. Since an <antiderivative> is $\arctan x$,
$$
I=\arctan1-\arctan0=\frac\pi4.
$$
Thus
$$
\boxed{\lim_{N\to\infty}S_N=\frac\pi4.}
$$