TITLE: A limit involving a double sum of products of arctangent values
QUESTION [5 upvotes]: How to evaluate 
$$\lim_{n \to \infty} \left[ \dfrac{1}{n^2} \sum_{1 \leq i < j \leq n} \tan^{-1} \left ( \dfrac{i}{n} \right) \tan^{-1} \left ( \dfrac{j}{n} \right) \right] ?$$ 
Any hint would be really appreciated.

REPLY [3 votes]: We just have to evaluate two limits through a Riemann-sum argument:
$$ A=\lim_{n\to +\infty}\frac{1}{n^2}\sum_{i=1}^{n}\arctan^2\left(\frac{i}{n}\right) = \lim_{n\to +\infty}\frac{1}{n}\int_{0}^{1}\arctan^2(x)\,dx = 0,$$
$$ B=\lim_{n\to +\infty}\frac{1}{n}\sum_{i=1}^{n}\arctan\left(\frac{i}{n}\right)=\int_{0}^{1}\arctan(x)\,dx = \frac{\pi-\log(4)}{4}$$
to deduce that:
$$ \lim_{n\to +\infty}\frac{1}{n^2}\sum_{1\leq i<j\leq n}\arctan\left(\frac{i}{n}\right)\arctan\left(\frac{j}{n}\right)=\frac{B^2-A}{2}=\color{red}{\frac{(\pi-2\log 2)^2}{32}}.$$