Trying to Integrate$ \iint xy\log|x-y|\, dy\,dx $ Hello I am trying to integrate $$
I:=\int_{a}^{b}\int_{a}^{b}xy\log\left(\,\left\vert\,x - y\,\right\vert\,\right)
\,{\rm d}y\,{\rm d}x,\qquad 0 < a <b
$$
for $x,y\in \mathbb{R}$.  I added the bounds of integration to deal with any convergence problems as suggested. We can re-write this as
$$
I=\frac{1}{2}\int_a^b \int_a^b xy\log \left((x-y)^2\right)\, dy\,dx.
$$
From here we can re-write the log as
$$
\frac{1}{2}\int_a^b \int_a^b xy \left(\int\frac{2}{x-y}dx\right)dy\, dx.
$$
I am not sure how to approach this from here till end.  Thanks.
 A: If $x,y\in[a,b]\:\:$it converges, otherwise it does not. For simplicity lets say double integral is taken over $[0,1]\times[0,1]$.It has log singularity which is not that bad and integral converges $$
\int_{0}^{1}\int_{0}^{1}  xy\log|x-y|\, dy\,dx=\int_{0}^{1}\int_{0}^{y}xy\log(y-x)\,dx\,dy+\int_{0}^{1}\int_{y}^{1}xy\log(x-y)\,dx\,dy
$$
$$=\int_{0}^{1}y\int_{0}^{y}x\log(y-x)\,dx\,dy+\int_{0}^{1}y\int_{y}^{1}x\log(x-y)\,dx\,dy$$
$$=\int_{0}^{1}y\int_{0}^{y}(y-t)\log t\,dt\,dy+\int_{0}^{1}y\int_{0}^{1-y}(y+s)\log s\,ds\,dy$$
$$=\int_0^1y(\frac{1}{2}y^2\log y-\frac{3}{4}y^2)dy+\int_0^1y\big(\frac{1}{2}(1-y^2)\log(1- y)-\frac{1}{4}(1-y)(1+3y)\big)dy\approx -0.437.$$
A: First notice the integrand is symmetric in $x$ and $y$, so it suffices to double the $y > x$ portion; that is
$$
I:=2\int_{a}^{b}\int_{x}^{b}xy\log\left(y - x \right)
\,{\rm d}y\,{\rm d}x,\qquad 0 < a <b$$
Change variables to $u = y - x$ and $v = y + x$. The triangle of integration rotates to another triangle and we get 
$${1 \over 4}\int_{0}^{b - a}\int_{ 2a + u }^{2b - u}{v - u \over 2}{v + u \over 2}\log\left(u \right)
\,{\rm d}v\,{\rm d}u,\qquad 0 < a <b$$
$$= {1 \over 16}\int_{0}^{b - a}\log\left(u \right)\int_{ 2a + u }^{2b - u}(v^2 - u^2)
\,{\rm d}v\,{\rm d}u,\qquad 0 < a <b$$
$$ = {1 \over 16}\int_{0}^{b - a}\log\left(u \right)(-{4 \over 3})(2 a^3 + 3 a^2 u - (b - u)^2 (2 b + u))) \,du$$
The integral rather sucks but it can be done in an elementary fashion through an integration by parts.
