How does one show that $\int_{-\infty}^{+\infty}{\left(x\over 2+2^{x}+2^{-x}\right)^2}\mathrm dx={\zeta(2)-1\over 3}\cdot{1\over \ln^3(2)}?$

$$ \begin{align} \int_{-\infty}^\infty{\left(\frac{x}{2+2^x+2^{-x}}\right)^2}\mathrm{d}x &=\frac1{\log(2)^3}\int_{-\infty}^\infty{\left(\frac{x}{2+e^x+e^{-x}}\right)^2}\mathrm{d}x\tag{1}\\ &=\frac2{\log(2)^3}\lim_{\epsilon\to0^+}\int_0^\infty\frac{x^{2+\epsilon}}{\left(1+e^{-x}\right)^4}e^{-2x}\,\mathrm{d}x\tag{2}\\ &=\frac2{\log(2)^3}\lim_{\epsilon\to0^+}\sum_{k=0}^\infty\int_0^\infty\binom{-4}{k}x^{2+\epsilon}e^{-(k+2)x}\,\mathrm{d}x\tag{3}\\ &=\frac2{\log(2)^3}\lim_{\epsilon\to0^+}\sum_{k=2}^\infty\int_0^\infty(-1)^k\binom{k+1}{3}x^{2+\epsilon}e^{-kx}\,\mathrm{d}x\tag{4}\\ &=\frac2{\log(2)^3}\lim_{\epsilon\to0^+}\Gamma(3+\epsilon)\sum_{k=2}^\infty\frac{(-1)^k}{k^{3+\epsilon}}\binom{k+1}{3}\tag{5}\\ &=\frac4{\log(2)^3}\lim_{\epsilon\to0^+}\sum_{k=2}^\infty\frac{(-1)^k}{k^{3+\epsilon}}\frac{k^3-k}6\tag{6}\\ &=\frac4{\log(2)^3}\lim_{\epsilon\to0^+}\frac16\left(1-\eta(\epsilon)+\eta(2+\epsilon)-1\right)\tag{7}\\ &=\frac1{\log(2)^3}\frac{\zeta(2)-1}3\tag{8} \end{align} $$ Explanation:
$(1)$: substitute $x\mapsto x/\log(2)$
$(2)$: introduce a limit for later
$(3)$: apply the binomial theorem
$(4)$: substitute $k\mapsto k-2$
$(5)$: evaluate Gamma integral
$(6)$: limit the Gamma function and expand binomial coefficient
$(7)$: evaluate eta sum
$(8)$: $\eta(0)=\frac12$ and $\eta(2)=\frac{\zeta(2)}2$


We begin with the integral with exponentials in the denominator, which is $$I=\int_{-\infty}^{\infty} \frac{x^2}{(2+e^{x}+e^{-x})^2} \ dx.$$

Let $x=\ln(u),$ and $dx =\frac{1}{u} \ du,$ in which we have

$$I=\int_{0}^{\infty} \frac{u \ (\ln(u))^2}{(u+1)^4} \ du.$$

Now split $I$ into

$$I=\int_{0}^{1} \frac{u \ (\ln(u))^2}{(u+1)^4} \ du + \int_{1}^{\infty} \frac{u \ (\ln(u))^2}{(u+1)^4} \ du.$$ Perform a change of variables $u=\frac{1}{z}$ to see that the two integrals are equal to one another, and thus,

$$I=\int_{0}^{1} \frac{2u \ (\ln(u))^2}{(u+1)^4} \ du.$$

Now here is the fun part. Consider the triple integral

$$J=\int_{0}^{1}\int_{1}^{u}\int_{1}^{y} \frac{2u}{zy(1+u)^4} \ dz \ dy \ du.$$ If we integrate this in the order presented, we get $J=I.$ On the other hand, we reverse the order of integration.

$$J=\int_{0}^{1}\int_{0}^{y}\int_{1}^{y} \frac{4u}{zy(1+u)^4} \ dz \ du \ dy,$$ and integrating (by parts the second time) gives us

$$I= \int_{0}^{1} \frac{2y(3+y) \ln(y)}{3(1+y)^3} \ dy.$$ Expand the integrand with partial fractions and see

$$I= \int_{0}^{1} - \frac{2 \ln(y)}{3(y+1)} \ dy - \int_{0}^{1} \frac{2 \ln(y)}{3(y+1)^2} \ dy + \int_{0}^{1} \frac{4 \ln(y)}{3(y+1)^3} \ dy$$

Now the first term $$\int_{0}^{1} -\frac{2 \ln(y)}{3(y+1)} \ dy=\frac{\zeta(2)}{3}$$ which we can obtain by converting the integrand into a geometric series and using the fact that $$\sum_{n=0}^{\infty} \frac{(-1)^{n}}{(n+1)^2} =\eta(2)=\frac{\zeta(2)}{2}=\frac{\pi^2}{12}$$ by the Basel Problem.

The second term $$\int_{0}^{1} -\frac{2 \ln(y)}{3(y+1)^2} \ dy=\frac{2 \ln(2)}{3},$$ which can be proved by integration by parts $u=\frac{2}{3} \ln(y)$ and $dv = \frac{-1}{(y+1)^2} \ dy$ and a use of partial fractions (on the $\int_{0}^{1} v \ du$ part).

Similarly, apply the same reasoning to show that $$\int_{0}^{1} \frac{4 \ln(y)}{3(y+1)^3} \ dy=-\frac{1+ 2\ln(2)}{3}$$

Combining the values together we get that $$I= \frac{-1+\zeta(2)}{3}.$$ Finally multiply this value by $\frac{1}{(\ln(2))^3}$ to get the value of your original integral.


$\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{\displaystyle{#1}}\,} \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} &\bbox[#ffe,10px]{\ds{% \int_{-\infty}^{\infty}{\pars{x \over 2 + 2^{x} + 2^{-x}}^{2}}\,\dd x}} = \int_{-\infty}^{\infty}{x^{2} \over \bracks{2 + \expo{\ln\pars{2}x} + \expo{-\ln\pars{2}x}}^{2}}\,\dd x \\[5mm] = &\ {1 \over \ln^{3}\pars{2}} \int_{-\infty}^{\infty} {x^{2} \over \bracks{2 + \expo{x} + \expo{-x}}^{2}}\,\dd x \,\,\,\stackrel{t\ =\ \exp\pars{x}}{=}\,\,\, {1 \over \ln^{3}\pars{2}}\int_{0}^{\infty} {\ln^{2}\pars{t} \over \pars{2 + t + 1/t}^{\,2}}\pars{1 \over t}\,\dd t \\[5mm] = &\ {1 \over \ln^{3}\pars{2}}\int_{0}^{\infty} {t\ln^{2}\pars{t} \over \pars{2t + t^{2} + 1}^{\,2}}\,\dd t = {1 \over \ln^{3}\pars{2}}\int_{0}^{\infty} {t\ln^{2}\pars{t} \over \pars{t + 1}^{\,4}}\,\dd t \\[5mm] = & \left.{1 \over \ln^{3}\pars{2}} \partiald[2]{}{\epsilon}\int_{0}^{\infty}{t^{\epsilon + 1} \over \pars{t + 1}^{\,4}}\,\dd t \,\right\vert_{\ \epsilon\ =\ 0} \,\,\,\stackrel{t\ =\ 1/x\ -\ 1}{=}\,\,\, \left.{1 \over \ln^{3}\pars{2}}\partiald[2]{}{\epsilon} \int_{0}^{1}x^{1 - \epsilon}\,\pars{1 - x}^{1 + \epsilon}\,\dd x \,\right\vert_{\ \epsilon\ =\ 0} \\[5mm] = &\ \left.{1 \over \ln^{3}\pars{2}}\partiald[2]{}{\epsilon} {\Gamma\pars{2 - \epsilon}\Gamma\pars{2 + \epsilon} \over \Gamma\pars{4}} \,\right\vert_{\ \epsilon\ =\ 0} = \left.{1 \over 6\ln^{3}\pars{2}} \partiald[2]{\bracks{\pars{\epsilon - \epsilon^{3}} \Gamma\pars{1 - \epsilon}\Gamma\pars{\epsilon}}}{\epsilon}\,\right\vert_{\ \epsilon\ =\ 0} \\[5mm] = &\ {1 \over 6\ln^{3}\pars{2}}\partiald[2]{}{\epsilon}\bracks{% \pi\,{\epsilon - \epsilon^{3} \over \sin\pars{\pi\epsilon}}} _{\ \epsilon\ =\ 0} = {1 \over 6\ln^{3}\pars{2}}\partiald[2]{}{\epsilon}\bracks{% {1 \over \sin\pars{\pi\epsilon}/\pars{\pi\epsilon}} - \epsilon^{2}} _{\ \epsilon\ =\ 0} \\[5mm] = &\ {1 \over 6\ln^{3}\pars{2}}\partiald[2]{}{\epsilon}\bracks{% 1 + {\pars{\pi\epsilon}^{2} \over 6} - \epsilon^{2}}_{\ \epsilon\ =\ 0} = {1 \over 6\ln^{3}\pars{2}}\pars{{\pi^{2} \over 3} - 2} = \bbx{{\zeta\pars{2} - 1 \over 3}\,{1 \over \ln^{3}\pars{2}}} \end{align}

because $\ds{\zeta\pars{2} = {\pi^{2} \over 6}}$.