Double Integral Math Olympiad Problem

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}}.}$$


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}. $$


$\newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ \begin{align} &\color{#f00}{\int_{0}^{\infty}\int_{0}^{\infty} {\ln\pars{\bracks{x + y}\verts{1 - xy}} \over \pars{1 + x^{2}}\pars{1 +y^{2}}} \,\dd x\,\dd y}\ =\ \overbrace{\int_{0}^{\infty}\int_{0}^{\infty} {\ln\pars{x} \over \pars{1 + x^{2}}\pars{1 + y^{2}}}\,\dd x\,\dd y}^{\ds{=\ 0}} \\[5mm] +&\ \int_{0}^{\infty}\int_{0}^{\infty} {\ln\pars{1 + y/x} \over \pars{1 + x^{2}}\pars{1 + y^{2}}}\,\dd x\,\dd y + \int_{0}^{\infty}\int_{0}^{\infty} {\ln\pars{\verts{1 - xy}} \over \pars{1 + x^{2}}\pars{1 + y^{2}}}\,\dd x\,\dd y \end{align} In the second integral, in the RHS, lets $\ds{x\ \mapsto\ 1/x}$: \begin{align} &\color{#f00}{\int_{0}^{\infty}\int_{0}^{\infty} {\ln\pars{\bracks{x + y}\verts{1 - xy}} \over \pars{1 + x^{2}}\pars{1 +y^{2}}} \,\dd x\,\dd y} \\[5mm] = &\ \int_{0}^{\infty}\int_{0}^{\infty} {\ln\pars{1 + y/x} \over \pars{1 + x^{2}}\pars{1 + y^{2}}}\,\dd x\,\dd y + \int_{0}^{\infty}\int_{0}^{\infty} {\ln\pars{\verts{1 - y/x}} \over \pars{1 + x^{2}}\pars{1 + y^{2}}}\,\dd x\,\dd y \\[5mm] = &\ \int_{0}^{\infty}{1 \over x^{2} + 1}\int_{0}^{\infty} {\ln\pars{\verts{1 - y^{2}/x^{2}}} \over 1 + y^{2}}\,\dd y\,\dd x \,\,\,\stackrel{y/x\ \mapsto\ y}{=}\,\,\, \int_{0}^{\infty}{x \over x^{2} + 1}\int_{0}^{\infty} {\ln\pars{\verts{1 - y^{2}}} \over 1 + x^{2}y^{2}}\,\dd y\,\dd x \\[5mm] = &\ \int_{0}^{\infty}\ln\pars{\verts{1 - y^{2}}}\ \overbrace{\int_{0}^{\infty} {x \over \pars{x^{2} + 1}\pars{y^{2}x^{2} + 1}}\,\dd x} ^{\ds{\ln\pars{y} \over y^{2} - 1}}\ \,\dd y\ =\ \int_{0}^{\infty}{\ln\pars{\verts{1 - y^{2}}}\ln\pars{y} \over y^{2} - 1}\,\dd y \end{align} Now, we split the integral along $\ds{\pars{0,1}}$ and $\ds{\pars{1,\infty}}$. Later on, we make the substitution $\ds{y \mapsto 1/y}$ in the second integral $\pars{~\mbox{along}\ \pars{1,\infty}~}$: \begin{align} &\color{#f00}{\int_{0}^{\infty}\int_{0}^{\infty} {\ln\pars{\bracks{x + y}\verts{1 - xy}} \over \pars{1 + x^{2}}\pars{1 +y^{2}}} \,\dd x\,\dd y} \\[5mm] = &\ \int_{0}^{1}{\ln\pars{1 - y^{2}}\ln\pars{y} \over y^{2} - 1}\,\dd y + \int_{0}^{1}{\bracks{\ln\pars{1 - y^{2}} - 2\ln\pars{y}}\ln\pars{y} \over y^{2} - 1}\,\dd y \\[5mm] = &\ 2\int_{0}^{1} {\ln\pars{1 - y^{2}}\ln\pars{y} - \ln^{2}\pars{y} \over y^{2} - 1}\,\dd y \,\,\,\stackrel{y^{2}\ \mapsto\ y}{=}\,\,\, 2\int_{0}^{1} {\ln^{2}\pars{y}/4 - \ln\pars{1 - y}\ln\pars{y}/2 \over 1 - y}\,{1 \over 2}\,y^{-1/2}\dd y \\[5mm] = &\ {1 \over 4}\ \underbrace{% \int_{0}^{1}{y^{-1/2}\ln^{2}\pars{y} \over 1 - y}\,\dd y} _{\ds{=\ 14\zeta\pars{3}}}\ -\ {1 \over 2}\ \underbrace{\int_{0}^{1}{y^{-1/2}\ln\pars{y}\ln\pars{1 - y} \over 1 - y}\,\dd y}_{\ds{=\ -\pi^{2}\ln\pars{2} + 7\zeta\pars{3}}}\ =\ \color{#f00}{{1 \over 2}\,\pi^{2}\ln\pars{2}} \end{align}

The last two integrals can be straightforward reduced to derivatives of the Beta Function and evaluated at suitable limits.