Double Integral Math Olympiad Problem
I was taking a Math Olympiad test and one of the questions was to calculate the following double integral: $$\int_0^\infty\int_0^\infty\frac{\log|(x+y)(1-xy)|}{(1+x^2)(1+y^2)}\ \mathrm{d}x\ \mathrm{d}y$$ Here, as usual, $\log a$ and $|a|$ are the natural logarithm and absolute value of $a$ respectively.
I'm guessing that you're not supposed to solve it analytically, but rather find some symmetry argument or clever simplification that would make it straightforward. Since I don't even know where to start, any help is welcome.
In case you want to know, this was taken from the 2016 Rio de Janeiro State Math Olympiad, known in Portuguese as OMERJ.
Solution 1:
By setting $x=\tan u$ and $y=\tan v$ we are left with
$$ I=\iint_{(0,\pi/2)^2}\log\left|(\tan x+\tan y)(1-\tan(x)\tan(y))\right|\,dx\,dy $$ and by translating the variables
$$ I = \iint_{(-\pi/4,\pi/4)^2}\log\left|\frac{2\sin(2x+2y)}{(\sin x+\cos x)^2(\sin y+\cos y)^2}\right|\,dx\,dy $$ so it is enough to exploit the Fourier series of $\log\sin x$, leading to: $$ \iint_{(-\pi/4,\pi/4)}\log\left|\sin(2x+2y)\right|\,dx\,dy = -\frac{\pi^2}{4}\log 2$$ and to: $$ \iint_{(-\pi/4,\pi/4)}\log\left|\sin x+\cos x\right|\,dx\,dy = -\frac{\pi^2}{8}\log 2 $$ to deduce: $$\boxed{ I = \color{red}{\frac{\pi^2\log 2}{2}}.}$$
Solution 2:
Here is a solution following @Sirzh's hint. Let
$$ I = \int_{0}^{\infty}\int_{0}^{\infty} \frac{\log|(x+y)(1-xy)|}{(1+x^2)(1+y^2)} \, dxdy $$
and
$$ J = \int_{0}^{\frac{\pi}{2}} \log \cos \theta \, d\theta = -\frac{\pi}{2}\log 2. \tag{1}$$
Applying the substitution $x = \tan u$ and $y = \tan v$ to $I$, we get
\begin{align*} I &= \int_{0}^{\frac{\pi}{2}}\int_{0}^{\frac{\pi}{2}} \log|(\tan u + \tan v)(1 - \tan u \tan v)| \, dudv \\ &= \int_{0}^{\frac{\pi}{2}}\int_{0}^{\frac{\pi}{2}} \log|\sin(u+v)\cos(u+v)| \, dudv - \int_{0}^{\frac{\pi}{2}}\int_{0}^{\frac{\pi}{2}} \log(\cos^2 u \cos ^2 v) \, dudv \tag{2} \\ &= \int_{0}^{\frac{\pi}{2}}\int_{0}^{\frac{\pi}{2}} \log\left|\frac{\sin(2u+2v)}{2}\right| \, dudv - 2\pi J. \\ &= \int_{0}^{\frac{\pi}{2}} \left( \frac{1}{2} \int_{v}^{\pi+v} \log \left| \frac{\sin \theta}{2} \right| \, d\theta \right) dv - 2\pi J \qquad (\theta = 2u+2v) \end{align*}
Now since $\theta \mapsto \log \left| \frac{\sin \theta}{2} \right|$ is $\pi$-periodic, for any $v$ we have
\begin{align*} \frac{1}{2} \int_{v}^{\pi+v} \log \left| \frac{\sin \theta}{2} \right| \, d\theta &= \frac{1}{2} \int_{0}^{\pi} \log \left| \frac{\sin \theta}{2} \right| \, d\theta \\ &= \int_{0}^{\frac{\pi}{2}} \log \left| \frac{\sin \theta}{2} \right| \, d\theta = J - \frac{\pi}{2}\log 2. \end{align*}
Therefore
$$I = \frac{\pi}{2} \left( J - \frac{\pi}{2}\log 2 \right) - 2\pi J = \frac{\pi^2}{2}\log 2.$$
$\text{(1)}$ : You may use the Fourier expansion
$$ \log |\cos\theta| = \Re \log\left(\frac{1+e^{2i\theta}}{2} \right) = -\log 2 + \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{n} \cos (2n\theta) $$
to compute $J$. Alternatively, one can compute $J$ from the following equation
$$J = \int_{0}^{\frac{\pi}{2}} \log \sin\theta \, d\theta = \int_{0}^{\frac{\pi}{2}} \log \sin(2\theta) \, d\theta = \int_{0}^{\frac{\pi}{2}} \log (2\sin \theta \cos \theta) \, d\theta = \frac{\pi}{2}\log 2 + 2J. $$
$\text{(2)}$ : Apply the addition formula to
$$ (\tan u + \tan v)(1 - \tan u \tan v) = \frac{(\sin u \cos v + \cos u \sin v)(\cos u \cos v - \sin u \sin v)}{\cos^2 u \cos^2 v}. $$