A double integral of a minimum function in two variables I've been reading the following paper: http://cowles.yale.edu/sites/default/files/files/pub/d20/d2065.pdf and I don't understand how following result is obtained (found on page 10):
$$\int_{s_1=0}^1 \int_{s_2=0}^1 \min \Big\{ \frac{a}{(1-s_1)(1-s_2)}, 1 \Big\} \ ds_1 \ ds_2 = a \Big(1 - \log(a) + \frac{1}{2}\log^2(a) \Big)$$
It has been a while since I've dealt with such integrals so I'd appreciate a hint to get me started in the right direction. Thank you.
 A: For $a\in (0,1]$ the given integral can be written as 
$$I:=\int_{t_1=0}^1 \int_{t_2=0}^1 \min \Big\{ \frac{a}{t_1t_2}, 1 \Big\} \ dt_1 \ dt_2$$
where $t_1=1-s_1$, $t_2=1-s_2$. 
Note that in the square $[0,1]^2$, $\min \Big\{ \frac{a}{t_1t_2}, 1 \Big\}=\frac{a}{t_1t_2}$ if and only if $(t_1,t_2)$ belongs to the set
$$T:=\{(t_1,t_2)\in [0,1]^2: t_1t_2\geq a\}=\{(t_1,t_2): t_1\in [a,1], t_2\in [a/t_1,1]\}.$$ 
Hence, by splitting the domain of integration, we get
\begin{align*}I
&=\iint_{[0,1]^2\setminus T} 1 \ dt_1 \ dt_2+a\iint_{T}\frac{1}{t_1t_2} \ dt_1 \ dt_2\\
&=\left(1-\iint_{T} 1 \ dt_1 \ dt_2\right)+a\iint_{T}\frac{1}{t_1t_2} \ dt_1 \ dt_2\\
&=\left(1-\int_{t_1=a}^1\int_{t_2=a/t_1}^11 \ dt_2 \ dt_1\right)+a\int_{t_1=a}^1\int_{t_2=a/t_1}^1\frac{1}{t_1t_2} \ dt_2 \ dt_1\\
&=1-\int_{t_1=a}^1\left(1-\frac{a}{t_1}\right)dt_1+a\int_{t_1=a}^1\frac{\ln(t_1/a)}{t_1}\ dt_1\\
&=a-a\ln(a)+a\int_{r=1}^{1/a}\ln(r) (\ln(r))' dr \qquad (\text{with $r=t_1/a$})\\
&=a \Big(1 - \ln(a) + \frac{1}{2}\ln^2(a) \Big).
\end{align*}
