A closed form for a triple integral with sines and cosines
$$\small\int^\infty_0 \int^\infty_0 \int^\infty_0 \frac{\sin(x)\sin(y)\sin(z)}{xyz(x+y+z)}(\sin(x)\cos(y)\cos(z) + \sin(y)\cos(z)\cos(x) + \sin(z)\cos(x)\cos(y))\,dx\,dy\,dz$$
I saw this integral $I$ posted on a page on Facebook . The author claims that there is a closed form for it.
My Attempt
This can be rewritten as
$$3\small\int^\infty_0 \int^\infty_0 \int^\infty_0 \frac{\sin^2(x)\sin(y)\cos(y)\sin(z)\cos(z)}{xyz(x+y+z)}\,dx\,dy\,dz$$
Now consider
$$F(a) = 3\int^\infty_0 \int^\infty_0 \int^\infty_0\frac{\sin^2(x)\sin(y)\cos(y)\sin(z)\cos(z) e^{-a(x+y+z)}}{xyz(x+y+z)}\,dx\,dy\,dz$$
Taking the derivative
$$F'(a) = -3\int^\infty_0 \int^\infty_0 \int^\infty_0\frac{\sin^2(x)\sin(y)\cos(y)\sin(z)\cos(z) e^{-a(x+y+z)}}{xyz}\,dx\,dy\,dz$$
By symmetry we have
$$F'(a) = -3\left(\int^\infty_0 \frac{\sin^2(x)e^{-ax}}{x}\,dx \right)\left( \int^\infty_0 \frac{\sin(x)\cos(x)e^{-ax}}{x}\,dx\right)^2$$
Using W|A I got
$$F'(a) = -\frac{3}{16} \log\left(\frac{4}{a^2}+1 \right)\arctan^2\left(\frac{2}{a}\right)$$
By integeration we have
$$F(0) = \frac{3}{16} \int^\infty_0\log\left(\frac{4}{a^2}+1 \right)\arctan^2\left(\frac{2}{a}\right)\,da$$
Let $x = 2/a$
$$\tag{1}I = \frac{3}{8} \int^\infty_0\frac{\log\left(x^2+1 \right)\arctan^2\left(x\right)}{x^2}\,dx$$
Question
I seem not be able to verify (1) is correct nor find a closed form for it, any ideas ?
Solution 1:
Ok I was able to find the integral
$$\int^\infty_0\frac{\log\left(x^2+1 \right)\arctan^2\left(x\right)}{x^2}\,dx$$
First note that
$$\int \frac{\log(1+x^2)}{x^2}\,dx = 2 \arctan(x) - \frac{\log(1 + x^2)}{x}+C$$
Using integration by parts
$$I = \frac{\pi^3}{12}+2\int^\infty_0\frac{\arctan(x)\log(1 + x^2)}{(1+x^2)x}\,dx$$
For the integral let
$$F(a) = \int^\infty_0\frac{\arctan(ax)\log(1 + x^2)}{(1+x^2)x}\,dx$$
By differentiation we have
$$F'(a) = \int^\infty_0 \frac{\log(1+x^2)}{(1 + a^2 x^2)(1+x^2)}\,dx $$
Letting $1/a = b$ we get
$$\frac{1}{(1 + a^2 x^2)(1+x^2)} = \frac{1}{a^2} \left\{ \frac{1}{((1/a)^2+x)(1+x^2)}\right\} =\frac{b^2}{1-b^2}\left\{ \frac{1}{b^2+x^2}-\frac{1}{1+x^2} \right\}$$
We conclude that $$\frac{b^2}{1-b^2}\int^\infty_0 \frac{\log(1+x^2)}{b^2+x^2}-\frac{\log(1+x^2)}{1+x^2} \,dx = \frac{b^2}{1-b^2}\left\{ \frac{\pi}{b}\log (1+b)-\pi\log(2)\right\}$$
Where we used that
$$\int^\infty_0 \frac{\log(a^2+b^2x^2)}{c^2+g^2x^2}\,dx = \frac{\pi}{cg}\log \frac{ag+bc}{g}$$
By integration we deduce that
$$\int^1_0 \frac{\pi}{a^2-1}\left\{ a\log \left(1+\frac{1}{a} \right)-\log(2)\right\}\,da = \frac{\pi}{2}\log^2(2)$$
For the last one I used wolfram alpha, however it shouldn't be difficult to prove.
Finally we have
$$\int^\infty_0\frac{\log\left(x^2+1 \right)\arctan^2\left(x\right)}{x^2}\,dx = \frac{\pi^3}{12}+\pi \log^2(2)$$
Solution 2:
Another approach to break down the last integral might be to consider the integral of $\displaystyle \frac{\log^3 (1-iz)}{z^2}$ along a positively oriented semi-circular contour $\gamma_R = [-R,R]\cup Re^{i[0,\pi]}$ in the upper half-plane. (We choose the branch of logarithm $\log (1-iz)$ in the lower half-plane along $[-i,-i\infty)$).
The integral along the arc is $\displaystyle \mathcal{O}\left(\frac{\log^3 R}{R}\right)$, which vanishes as $R \to +\infty$ we have,
\begin{align*}0 = \lim\limits_{R \to \infty} \int\limits_{\gamma_R} \frac{\log^3 (1-iz)}{z^2}\,dz = \int_{-\infty}^{\infty} \frac{\log^3\left((1+x^2)^{1/2} - i\arctan x\right)}{x^2}\,dx\end{align*}
Comparing the real parts on both sides,
\begin{align*} \int_{-\infty}^{\infty} \frac{\log(1+x^2)(\arctan x)^2}{x^2}\,dx &= \frac{1}{12}\int_{-\infty}^{\infty} \frac{\log^3(1+x^2)}{x^2}\,dx \\&= \frac{1}{6}\int_{0}^{\infty} \frac{\log^3(1+x^2)}{x^2}\,dx\\&\underset{\text{(IBP)}}{=} \int_0^{\infty} \frac{\log^2 (1+x^2)}{1+x^2}\,dx \\&= \int_0^{\pi/2} \log^2 (\cos \theta)\,d\theta \\&= \lim\limits_{b \to \frac{1}{2}}\frac{1}{2}\frac{\partial^2}{\partial b^2} B\left(\frac{1}{2},b\right)\\&= \frac{\pi}{2}\left(4\log^2 2 + \frac{\pi^2}{3}\right)\end{align*}
Hence, $$\displaystyle \int_{0}^{\infty} \frac{\log(1+x^2)(\arctan x)^2}{x^2}\,dx = \frac{\pi^3}{12} + \pi\log^2 2$$
Solution 3:
Another solution.
$\displaystyle J=\int^\infty_0\frac{\log\left(x^2+1 \right)\arctan^2x}{x^2}\,dx$
Perform integration by parts,
$\begin{align} J&=-\left[\frac{\log\left(x^2+1 \right)\arctan^2 x}{x}\right]_0^{\infty}+\int_0^{\infty}\frac{1}{x}\left(\frac{2x\arctan^2 x}{1+x^2}+\frac{2\log\left(x^2+1 \right)\arctan x}{1+x^2}\right)\,dx\\ &=2\int_0^{\infty}\frac{\arctan^2 x}{1+x^2}\,dx+2\int_0^{\infty}\frac{\log\left(x^2+1 \right)\arctan x}{x(1+x^2)}\,dx\\ &=\frac{2}{3}\Big[\arctan^3 x\Big]_0^{\infty}+2\int_0^{\infty}\frac{\log\left(x^2+1 \right)\arctan x}{x(1+x^2)}\,dx\\ &=\frac{\pi^3}{12}+2\int_0^{\infty}\frac{\log\left(x^2+1 \right)\arctan x}{x(1+x^2)}\,dx\\ \end{align}$
In the following integral, perform the change of variable $x=\tan \theta$,
$\begin{align} K&=\int_0^{\infty}\frac{\log\left(x^2+1 \right)\arctan x}{x(1+x^2)}\,dx\\ &=-2\int_0^{\frac{\pi}{2}}\theta\cot\theta\ln\left(\cos\theta\right)\,d\theta\\ \end{align}$
Perform integration by parts,
$\begin{align} K&=-2\Big[\ln\left(\sin\theta\right)\theta\ln\left(\cos\theta\right)\Big]_0^{\frac{\pi}{2}}+2\int_0^{\frac{\pi}{2}}\ln\left(\sin\theta\right)\Big(\ln\left(\cos\theta\right)-\theta\tan \theta\Big)\,d\theta\\ &=2\int_0^{\frac{\pi}{2}}\ln\left(\sin\theta\right)\ln\left(\cos\theta\right)\,d\theta-2\int_0^{\frac{\pi}{2}}\theta\tan \theta\ln\left(\sin\theta\right)\,d\theta \end{align}$
In the second integral perform the change of variable $x=\frac{\pi}{2}-\theta$,
$\begin{align} K&=2\int_0^{\frac{\pi}{2}}\ln\left(\sin\theta\right)\ln\left(\cos\theta\right)\,d\theta-2\int_0^{\frac{\pi}{2}}\left(\frac{\pi}{2}-\theta\right)\cot \theta\ln\left(\cos\theta\right)\,d\theta\\ &=2\int_0^{\frac{\pi}{2}}\ln\left(\sin\theta\right)\ln\left(\cos\theta\right)\,d\theta-\pi\int_0^{\frac{\pi}{2}}\cot \theta\ln\left(\cos\theta\right)\,d\theta+2\int_0^{\frac{\pi}{2}}\theta\cot \theta\ln\left(\cos\theta\right)\,d\theta\\ &=2\int_0^{\frac{\pi}{2}}\ln\left(\sin\theta\right)\ln\left(\cos\theta\right)\,d\theta-\pi\int_0^{\frac{\pi}{2}}\cot \theta\ln\left(\cos\theta\right)\,d\theta-K \end{align}$
Therefore,
$\begin{align} K&=\int_0^{\frac{\pi}{2}}\ln\left(\sin\theta\right)\ln\left(\cos\theta\right)\,d\theta-\frac{\pi}{2}\int_0^{\frac{\pi}{2}}\cot \theta\ln\left(\cos\theta\right)\,d\theta \end{align}$
Moreover,
$\begin{align} \int_0^{\frac{\pi}{2}}\cot \theta\ln\left(\cos\theta\right)\,d\theta&=\int_0^{\frac{\pi}{4}}\cot \theta\ln\left(\cos\theta\right)\,d\theta+\int_{\frac{\pi}{4}}^{\frac{\pi}{2}}\cot \theta\ln\left(\cos\theta\right)\,d\theta \end{align}$
Perform the change of variable $x=\frac{\pi}{2}-\theta$ in the second integral,
$\begin{align} \int_0^{\frac{\pi}{2}}\cot \theta\ln\left(\cos\theta\right)\,d\theta&=\int_0^{\frac{\pi}{4}}\cot \theta\ln\left(\cos\theta\right)\,d\theta+\int_0^{\frac{\pi}{4}}\tan \theta\ln\left(\sin\theta\right)\,d\theta\\ &=\left(\Big[\ln\left(\sin\theta\right)\ln\left(\cos\theta\right)\Big]_0^{\frac{\pi}{4}}+\int_0^{\frac{\pi}{4}}\tan \theta\ln\left(\sin\theta\right)\,d\theta\right)+\int_0^{\frac{\pi}{4}}\tan \theta\ln\left(\sin\theta\right)\,d\theta\\ &=\frac{1}{4}\ln^2 2+2\int_0^{\frac{\pi}{4}}\tan \theta\ln\left(\sin\theta\right)\,d\theta\\ &=\frac{1}{4}\ln^2 2+2\int_0^{\frac{\pi}{4}}\tan \theta\ln\left(\cos\theta\tan\theta\right)\,d\theta\\ &=\frac{1}{4}\ln^2 2+2\int_0^{\frac{\pi}{4}}\tan \theta\ln\left(\cos\theta\right)\,d\theta+2\int_0^{\frac{\pi}{4}}\tan \theta\ln\left(\tan\theta\right)\,d\theta\\ &=\frac{1}{4}\ln^2 2-\Big[\ln^2\left(\cos\theta\right)\Big]_0^{\frac{\pi}{4}}+2\int_0^{\frac{\pi}{4}}\tan \theta\ln\left(\tan\theta\right)\,d\theta\\ &=2\int_0^{\frac{\pi}{4}}\tan \theta\ln\left(\tan\theta\right)\,d\theta \end{align}$
Perform the change of variable $x=\tan \theta$,
$\begin{align} \int_0^{\frac{\pi}{2}}\cot \theta\ln\left(\cos\theta\right)\,d\theta&=\int_0^1 \frac{2x\ln x}{1+x^2}\,dx\\ &=\frac{1}{2}\int_0^1 \frac{2x\ln(x^2)}{1+x^2}\,dx\\ \end{align}$
Perform the change of variable $y=x^2$,
$\begin{align} \int_0^{\frac{\pi}{2}}\cot \theta\ln\left(\cos\theta\right)\,d\theta&=\frac{1}{2}\int_0^1 \frac{\ln x}{1+x}\,dx\\ &=-\frac{1}{24}\pi^2 \end{align}$
$\begin{align} L&=\int_0^{\frac{\pi}{2}}\ln\left(\sin\theta\right)\ln\left(\cos\theta\right)\,d\theta\\ &=\frac{1}{4}\int_0^{\frac{\pi}{2}}\left(\left(\ln\left(\sin\theta\right)+\ln\left(\cos\theta\right)\right)^2-\left(\ln\left(\sin\theta\right)-\ln\left(\cos\theta\right)\right)^2\right)\,d\theta\\ &=\frac{1}{4}\int_0^{\frac{\pi}{2}}\ln^2\left(\sin\theta\cos\theta\right)\,d\theta-\frac{1}{4}\int_0^{\frac{\pi}{2}}\ln^2\left(\tan\theta\right)\,d\theta\\ &=\frac{1}{4}\int_0^{\frac{\pi}{2}}\ln^2\left(\frac{1}{2}\sin(2\theta)\right)\,d\theta-\frac{1}{4}\int_0^{\frac{\pi}{2}}\ln^2\left(\tan\theta\right)\,d\theta \end{align}$
In the first integral perform the change of variable $x=2\theta$,
$\begin{align} L&=\frac{1}{8}\int_0^{\pi}\ln^2\left(\frac{1}{2}\sin\theta\right)\,d\theta-\frac{1}{4}\int_0^{\frac{\pi}{2}}\ln^2\left(\tan\theta\right)\,d\theta\\ &=\frac{1}{8}\int_0^{\frac{\pi}{2}}\ln^2\left(\frac{1}{2}\sin\theta\right)\,d\theta+\frac{1}{8}\int_{\frac{\pi}{2}}^\pi\ln^2\left(\frac{1}{2}\sin\theta\right)\,d\theta-\frac{1}{4}\int_0^{\frac{\pi}{2}}\ln^2\left(\tan\theta\right)\,d\theta\\ \end{align}$
In the second integral perform the change of variable $x=\pi-\theta$,
$\begin{align} L&=\frac{1}{4}\int_0^{\frac{\pi}{2}}\ln^2\left(\frac{1}{2}\sin\theta\right)\,d\theta-\frac{1}{4}\int_0^{\frac{\pi}{2}}\ln^2\left(\tan\theta\right)\,d\theta\\ &=\frac{1}{8}\pi\ln^2 2+\frac{1}{4}\int_0^{\frac{\pi}{2}}\ln^2(\sin \theta)\,d\theta-\frac{1}{2}\ln 2\int_0^{\frac{\pi}{2}}\ln(\sin \theta)\,d\theta-\frac{1}{4}\int_0^{\frac{\pi}{2}}\ln^2\left(\tan\theta\right)\,d\theta\\ \end{align}$
$\begin{align} M&=\int_0^{\frac{\pi}{2}}\ln^2(\sin \theta)\,d\theta\\ &=\int_0^{\frac{\pi}{2}}\ln^2(\tan\theta\cos \theta)\,d\theta\\ &=\int_0^{\frac{\pi}{2}}\ln^2\left(\tan\theta\right)\,d\theta+\int_0^{\frac{\pi}{2}}\ln^2\left(\cos\theta\right)\,d\theta+2\int_0^{\frac{\pi}{2}}\ln\left(\tan\theta\right)\ln\left(\cos\theta\right)\,d\theta\\ &=\int_0^{\frac{\pi}{2}}\ln^2\left(\tan\theta\right)\,d\theta+\int_0^{\frac{\pi}{2}}\ln^2\left(\cos\theta\right)\,d\theta+2\int_0^{\frac{\pi}{2}}\ln\left(\sin \theta\right)\ln\left(\cos \theta\right)\,d\theta-2\int_0^{\frac{\pi}{2}}\ln^2\left(\cos \theta\right)\,d\theta\\ &=\int_0^{\frac{\pi}{2}}\ln^2\left(\tan\theta\right)\,d\theta+2L-\int_0^{\frac{\pi}{2}}\ln^2\left(\cos\theta\right)\,d\theta \end{align}$
In the second integral perform the change of variable $x=\frac{\pi}{2}-\theta$,
$\begin{align} M&=\int_0^{\frac{\pi}{2}}\ln^2\left(\tan\theta\right)\,d\theta+2L-M \end{align}$
Therefore,
$\begin{align} M&=\frac{1}{2}\int_0^{\frac{\pi}{2}}\ln^2\left(\tan\theta\right)\,d\theta+L \end{align}$
Therefore,
$\begin{align} L&=\frac{1}{8}\pi\ln^2 2-\frac{1}{8}\int_0^{\frac{\pi}{2}}\ln^2\left(\tan\theta\right)\,d\theta-\frac{1}{2}\ln 2\int_0^{\frac{\pi}{2}}\ln(\sin \theta)\,d\theta+\frac{1}{4}L \end{align}$
Thus,
$\begin{align} L&=\frac{1}{6}\pi\ln^2 2-\frac{1}{6}\int_0^{\frac{\pi}{2}}\ln^2\left(\tan\theta\right)\,d\theta-\frac{2}{3}\ln 2\int_0^{\frac{\pi}{2}}\ln(\sin \theta)\,d\theta\\ &=\frac{1}{6}\pi\ln^2 2-\frac{1}{6}\int_0^{\frac{\pi}{4}}\ln^2\left(\tan\theta\right)\,d\theta-\frac{1}{6}\int_{\frac{\pi}{4}}^{\frac{\pi}{2}}\ln^2\left(\tan\theta\right)\,d\theta-\frac{2}{3}\ln 2\int_0^{\frac{\pi}{2}}\ln(\sin \theta)\,d\theta\\ \end{align}$
In the second integral perform the change of variable $x=\frac{\pi}{2}-\theta$,
$\begin{align} L&=\frac{1}{6}\pi\ln^2 2-\frac{1}{3}\int_0^{\frac{\pi}{4}}\ln^2\left(\tan\theta\right)\,d\theta-\frac{2}{3}\ln 2\int_0^{\frac{\pi}{2}}\ln(\sin \theta)\,d\theta\\ \end{align}$
In the second integral perform the change of variable $x=\tan\theta$,
$\begin{align} L&=\frac{1}{6}\pi\ln^2 2-\frac{1}{3}\int_0^1\frac{\ln^2 x}{1+x^2}\,dx-\frac{2}{3}\ln 2\int_0^{\frac{\pi}{2}}\ln(\sin \theta)\,d\theta\\ \end{align}$
It is well known that,
$\displaystyle \int_0^1\frac{\ln^2 x}{1+x^2}\,dx=\dfrac{1}{16}\pi^3$
and,
$\displaystyle \int_0^{\frac{\pi}{2}}\ln(\sin \theta)\,d\theta=-\frac{1}{2}\pi\ln 2$
Therefore,
$\begin{align} L&=\frac{1}{2}\pi\ln^2 2-\frac{1}{48}\pi^3 \end{align}$
Therefore,
$\begin{align} K&=\frac{1}{2}\pi\ln^2 2 \end{align}$
Therefore,
$\boxed{\displaystyle J=\frac{1}{12}\pi^3+\pi\ln^2 2}$