Value of an integral involving the fractional part function I have difficulties in evaluating the double integral defined in the following. 

Let 
  $$\left\{ t \right\} = t - \lfloor t \rfloor, $$
  $ t> 0$  be the fractional part function, where the function $\lfloor t \rfloor$ is representing the greatest integer contained in $t$, known also as the floor function. What is the value of:
  \begin{equation}
    \int_{0}^{\alpha}\int_{0}^{\alpha} \left\{\dfrac{x}{y}\right\} \left\{\dfrac{y}{x}\right\} dx dy
\end{equation} 
  where $ 0 < \alpha < 1$ ? 

Thanks for help.
 A: Use the change of variables $s = x/\alpha, t = x/y$. 
Then
$$I = \int_{0}^{\alpha}\int_{0}^{\alpha} \left\{\dfrac{x}{y}\right\} \left\{\dfrac{y}{x}\right\} dx dy=\alpha^2\int_{0}^{1}\int_{s}^{\infty} \frac{s}{t^2}\left\{t\right\} \left\{\frac1{t}\right\} dt ds.$$
Integrating  by parts, with $u = \int_{s}^{\infty} \frac{1}{t^2}\left\{t\right\} \left\{\frac1{t}\right\} dt$ and $dv = sds$,
$$\begin{align}I/\alpha^2 &= \left.\frac{s^2}{2}\int_{s}^{\infty} \frac{1}{t^2}\left\{t\right\} \left\{\frac1{t}\right\} dt\right|_{s=0}^{s=1}+ \frac1{2}\int_0^1\left\{s\right\} \left\{\frac1{s}\right\}ds\\
 &=\frac{1}{2}\int_{1}^{\infty} \frac{1}{t^2}\left\{t\right\} \left\{\frac1{t}\right\} dt+ \frac1{2}\int_0^1 \left\{s\right\} \left\{\frac1{s}\right\}ds\\ &=\int_0^1\left\{s\right\} \left\{\frac1{s}\right\}ds.\end{align}$$
Now
$$\begin{align}\int_0^1\left\{s\right\} \left\{\frac1{s}\right\}ds &=\sum_{k=1}^{\infty}\int_{1/(k+1)}^{1/k}\left\{s\right\} \left\{\frac1{s}\right\}ds\\ &= \sum_{k=1}^{\infty}\int_{1/(k+1)}^{1/k}s (1/s-k)ds\\ &=\sum_{k=1}^{\infty}\left.\left(s- \frac{k}{2}s^2\right)\right|_{1/(k+1)}^{1/k}\\ &=\sum_{k=1}^{\infty}\left[\frac{1}{k(k+1)}-\frac{2k+1}{2k(k+1)^2}\right]\\ &=\frac1{2}\sum_{k=1}^{\infty}\frac{1}{k(k+1)^2}\\ &=\frac1{2}\sum_{k=1}^{\infty}\frac{1}{k(k+1)}-\frac1{2}\sum_{k=1}^{\infty}\frac{1}{(k+1)^2}\\ &=\frac1{2}\left[1- \left(\frac{\pi^2}{6}-1\right)\right].\end{align}$$
Finish this to get
$$I = \alpha^2\left(1 - \frac{\pi^2}{12}\right).$$
