Analytical expressions for extreme values of $f(x):=\log(2)\left(\sum_\limits{k=-\infty}^\infty 2^{k+x}e^{-2^{k+x}}\right)-1$ The function $f(x):=\log(2)\left(\sum_\limits{k=-\infty}^\infty 2^{k+x}e^{-2^{k+x}}\right)-1$ is a periodic function. Numerical optimization shows that the minimum and maximum of $f$ are approximately $-9.885\cdot10^{-6}$ and $9.885\cdot10^{-6}$, respectively. Are there any analytical expressions for these values?
 A: The Fourier series of the function $f(x)$, which has period equal to 1, is
\begin{equation}
f(x) = \Re\!\left(\sum_{l=1}^{\infty}
a_l \exp(2\pi lx \rm{i})\right)
\end{equation}
with coefficients
\begin{multline}
a_l = 2\int_0^1 f(x) e^{-2\pi lx \rm{i}} dx
=
2\log(2)\int_0^1 \sum_{k=-\infty}^\infty 2^{k+x}e^{-2^{k+x}}e^{-2\pi lx \rm{i}}dx\\
=
2\log(2)\sum_{k=-\infty}^\infty \int_{k}^{k+1} 2^{x}e^{-2^{x}}e^{-2\pi lx \rm{i}}dx
=
2\log(2) \int_{-\infty}^{\infty} 2^x e^{-2^{x}}
e^{-2\pi lx \rm{i}} dx.
\end{multline}
The variable transformation $y = 2^x$ yields
\begin{equation}
a_l
=
2\int_{0}^{\infty} e^{-y}
y^{-\frac{2\pi l \rm{i}}{\log(2)}}dy
= 
2\Gamma\!\left(1-\frac{2\pi  l \rm{i}}{\log(2)}\right)
\end{equation}
where $\Gamma$ denotes the gamma function. Using the identity $\left|\Gamma(1+ \rm{i}x)\right| = 
\sqrt{\frac{\pi x}{\sinh(\pi x)}}
$
we are able to write for the absolute values of the coefficients
\begin{equation}
|a_l| = 
2\sqrt{\frac{bl}{\sinh(bl)}}
\quad
\text{with}
\
b:=\frac{2\pi ^2}{\log 2}.
\end{equation}
In particular, the amplitude of the first harmonic is 
$|a_1|
\approx
9.884\cdot 10^{-6}$. 
Next we show that the deviation of $f(x)$ from the first harmonic is small. It is obvious that the deviation must be smaller than $\sum_{l=2}^{\infty} 
|a_l|$. The ratio of subsequent coefficients is given by
\begin{equation}
\frac{|a_{l+1}|}{|a_{l}|}
=
\sqrt{\frac{l+1}{l}}
\sqrt{\frac{
\sinh(b l)
}{
\sinh(b (l+1))
}}
=
\sqrt{\frac{l+1}{l}}
\sqrt{\frac{
1
}{
\cosh(b)
+
\frac{
\sinh(b)
}
{
\tanh(b l)
}
}}.
\end{equation}
For $l\geq 2$ we have $\sqrt{\frac{l+1}{l}}\leq \sqrt{\frac{3}{2}}$. Together with $\tanh(x)\leq 1$ we obtain
\begin{equation}
\frac{|a_{l+1}|}{
|a_{l}|
}
\leq
\sqrt{\frac{3}{2}}
\sqrt{\frac{
1
}{
\cosh(b)
+
\sinh(b)
}}
\\
=
\sqrt{\frac{
3
}{
2 e^b
}}.
\end{equation}
Consequently, $|a_{l}| \leq 
|a_{2}|
\left(\sqrt{\frac{
3
}{
2 e^b
}}\right)^{l-2}$ for $l\geq 2$ and 
\begin{equation}
\sum_{l=2}^{\infty} 
|a_l|
\leq
|a_2|
\sum_{l=0}^{\infty} 
\left(
\sqrt{\frac{
3
}{
2e^b
}}
\right)^l
=
2\sqrt{
\frac{2b}{\sinh(2b)}}
\frac{1}{1-
\sqrt{\frac{
3
}{
2 e^b
}}
}
\approx
9.154 \cdot 10^{-12}.
\end{equation}
Therefore the maximum and minimum of $f(x)$ are very close to $\pm|a_1|$.
