I have been trying to evaluate this integral: $\displaystyle \int_0^{\infty} \frac{\arctan^2 x \log^2 (1+x^2)}{x^2}\,dx$, but have failed despite all my attemps. I tried using the trig substitution $x = tan(a)$, and through a series of steps, was able to simplify the integral to $I(b)$ = $4\displaystyle \int_0^{\pi/2} \frac{(a\log(\cos(a))^b}{(\sin(a))^b}\,da$. I then tried to differentiate under the integral sign but failed. What should I do now?

Note: b = 2 in the latter integral.

• Might be useful math.stackexchange.com/q/340033/269624 – Yuriy S Aug 16 '16 at 1:02
• @Yuriy S I've been trying using a similar substitution to that, but I don't know enough multivariable calculus to get that far. – Why Do You Care Aug 16 '16 at 1:05
• @YuriyS sorry it didnt tag properly the first time – Why Do You Care Aug 16 '16 at 1:11
• Well, I think the method in the accepted answer there might work. You have: $$\frac{\arctan x}{x}=\int_0^1 \frac{dt}{1+x^2 t^2}$$ and $$\frac{\log (1+ x^2)}{x^2}=\int_0^1 \frac{dt}{1+x^2 t}$$ You can try several combinations of substitutions and then partial fractions – Yuriy S Aug 16 '16 at 1:18
• I managed to get the integral to $$2 \int_0^1 z \arctan \frac{1}{z} \int_0^\infty \frac{\ln^2 (1+x^2)}{1+z^2 x^2} dx dz$$ Not sure if it helps, but the other things I tried lead to more complicated expressions – Yuriy S Aug 16 '16 at 13:36

From messing around with coefficients on OEIS A049034, it seems that $$\arctan^2(x)=\sum_{n=0}^\infty \frac{(-1)^n x^{2+2n}}{2n+2}\left(H_{n+\frac{1}{2}}+\log(4)\right)$$ then $$I=\int_0^{\infty} \frac{\arctan^2 x \log^2 (1+x^2)}{x^2}\,dx$$ $$I=\int_0^{\infty} \frac{\sum_{n=0}^\infty \frac{(-1)^n x^{2+2n}}{2n+2}\left(H_{n+\frac{1}{2}}+\log(4)\right) \log^2 (1+x^2)}{x^2}\,dx$$ $$I=\int_0^{\infty} \sum_{n=0}^\infty \frac{(-1)^n x^{2n}}{2n+2}\left(H_{n+\frac{1}{2}}+\log(4)\right) \log^2 (1+x^2)\,dx$$ $$I=\log(4)\sum_{n=0}^\infty \frac{(-1)^n }{2n+2}\int_0^{\infty} x^{2n}\log^2 (1+x^2)\,dx \\+ \sum_{n=0}^\infty \frac{(-1)^n H_{n+\frac{1}{2}}}{2n+2} \int_0^{\infty} x^{2n} \log^2 (1+x^2)\,dx$$ the Mellin transform of $\log(x^2+1)^2$ is $$\int_0^\infty x^{s-1} \log(x^2+1)\;dx = -\frac{2\pi}{s} \csc\left(\frac{\pi s}{2}\right)\left(\gamma + \psi\left(-\frac{s}{2}\right)\right)$$ setting $s=2n+1$ then gives $$\int_0^{\infty} x^{2n} \log^2 (1+x^2)\,dx = -(-1)^n\frac{2\pi}{1+2n} H_{-n-\frac{3}{2}}$$ $$I=-\log(4)\sum_{n=0}^\infty \frac{1}{2n+2}\frac{2\pi}{1+2n} H_{-n-\frac{3}{2}} \\-\sum_{n=0}^\infty \frac{H_{n+\frac{1}{2}}}{2n+2}\frac{2\pi}{1+2n} H_{-n-\frac{3}{2}}$$ this gives $$I=-2\pi\sum_{n=0}^\infty \frac{H_{-n-\frac{3}{2}}\left(\log(4)+H_{n+\frac{1}{2}}\right)}{2+6n+4n^2}$$ but I don't trust the result yet because they don't appear to be numerically the same. There might be an error somewhere, but I'll leave it here and edit it if I work it out.
Using methods recorded here it can be shown that: $$\int_0^{\infty } \frac{\log ^2\left(x^2+1\right) \tan ^{-1}(x)^2}{x^2} \, dx=\frac{\pi \zeta (3)}{2}+\frac{4}{3} \pi \log ^3(2)+\frac{2}{3} \pi ^3 \log (2)$$ $$\int_0^{\infty } \frac{\log ^2\left(x^2+1\right) \tan ^{-1}(x)^2}{x^3} \, dx=\frac{9 \zeta (3)}{2}-\frac{5 \pi ^4}{48}+\pi ^2 \log (2)$$ $$\int_0^{\infty } \frac{\log ^2\left(x^2+1\right) \tan ^{-1}(x)^2}{x^4} \, dx=-\frac{\pi \zeta (3)}{6}+\frac{\pi ^3}{18}-\frac{4}{9} \pi \log ^3(2)+\frac{4}{3} \pi \log ^2(2)-\frac{2}{9} \pi ^3 \log (2)+\frac{4}{3} \pi \log (2)$$ Note that the second and third result reveals non-homogeneous phenomenon.