Solving $\int_1^2 \sum_{m = -\infty}^{\infty} \left(2^m x \cdot e^{- 2^m x} \right)dx$

definite integralsexponential functionintegrationreal-analysissequences-and-series

In this answer to another question, the following equation comes up $$g(x)=\sum_{m = -\infty}^{\infty} 2^m x \cdot e^{- 2^m x}$$

I am interested in the average value of $g(x)$ in the interval of $1 < x < 2$, which would be $$\frac{1}{2-1} \int_1^2 \sum_{m = -\infty}^{\infty} \left(2^m x \cdot e^{- 2^m x}\right) dx = \sum_{m=-\infty}^{\infty}\left( \int_1^2 2^mx\cdot e^{-2^mx}dx\right)$$

Mathematica gives the inner integral as $(-2-2^{-m}) e^{-2^{m+1}}+(1+2^{-m})e^{-2^m}$, so this can be simplified to $$\sum_{m=-\infty}^{\infty} \left((-2-2^{-m}) e^{-2^{m+1}}+(1+2^{-m})e^{-2^m}\right) \approx 1.4427$$

This is very close to $\frac{1}{\ln(2)}$, which leads me to believe that that is the closed form (although I am not sure). This is as far as I managed to get.

How can I find the exact value of $\int_1^2 g(x)dx$?

Edit: I managed to rewrite the sum as $$\lim_{N \to \infty}\left( 2^N-\sum_{m=-N+1}^{N}\left(1+2^{-m}\right)e^{-2^{m}}\right)$$

However, this form is much worse for numerical calculations.

Best Answer

We have the following alternate representation of $g(x)$: $$g(x)=\frac{1}{\log 2}\sum_{n=-\infty}^\infty\Gamma(1+s_n)x^{-s_n},\qquad s_n=\frac{2n\pi i}{\log 2}$$ (where $x^{-s_n}$ has its principal value), with the "coefficients" exponentially decaying in absolute value (if $a_n=|\Gamma(1+s_n)|$, then $a_n/a_{n+1}\to e^{\pi^2/\log 2}$ as $n\to\infty$, and $a_1\approx4.94222\cdot10^{-6}$ is already pretty small). This explains why the integral is very close to $1/\log 2$.

The formula above is obtained using Cahen–Mellin integral: for $y,c>0$ we have $$e^{-y}=\frac{1}{2\pi i}\int_{c-i\infty}^{c+i\infty}\Gamma(s)y^{-s}\,ds,$$ so that, taking $c>1$ (for the series to converge) and $y=2^m x$ for $m\geqslant 0$, we get $$\sum_{m=0}^\infty 2^m x e^{-2^m x}=\frac{1}{2\pi i}\int_{c-i\infty}^{c+i\infty}\frac{\Gamma(s)x^{1-s}}{1-2^{1-s}}\,ds,$$ equal to the (infinite) sum of residues of the integrand at its poles (this is proven by taking the integral along a large rectangular contour), which are at $s=-n$ (with nonnegative $n$) and $s=1+s_n$ (with any $n$): $$\sum_{m=0}^\infty 2^m x e^{-2^m x}=\sum_{n=0}^\infty\frac{(-1)^n}{n!}\frac{x^{n+1}}{1-2^{n+1}}+\frac{1}{\log 2}\sum_{n=-\infty}^\infty\Gamma(1+s_n)x^{-s_n}.$$

And the first sum on the RHS cancels exactly with the remainder of $g(x)$: $$\sum_{m=-\infty}^{-1}2^m x e^{-2^m x}=x\sum_{m=1}^\infty 2^{-m}\sum_{n=0}^\infty\frac{(-2^{-m}x)^n}{n!}\\=\sum_{n=0}^\infty\frac{(-1)^n}{n!}x^{n+1}\sum_{m=1}^\infty 2^{-m(n+1)}=\sum_{n=0}^\infty\frac{(-1)^n}{n!}\frac{x^{n+1}}{2^{n+1}-1}.$$

Related Question