Showing that $\sum_{n=0}^\infty (4n+1)q^{\left (\frac{4n+1}{2}\right)^2} - \sum_{n=1}^\infty (4n-1)q^{\left (\frac{4n-1}{2}\right)^2} \geq 0.1$ Recently I came along the following problem concerning a lower bound on the difference of two series:
I want to show that for every $q \in [e^{-2},e^{-\frac{1}{2}}]$ we have
$$
f(q) := \sum_{n=0}^\infty (4n+1)q^{\left (\frac{4n+1}{2}\right)^2} - \sum_{n=1}^\infty (4n-1)q^{\left (\frac{4n-1}{2}\right)^2} \geq \frac{1}{10}
$$
If I plot the function $f$ on the interval $[e^{-2},e^{-\frac{1}{2}}]$ I get the following:

Hence, the minimum seems to be attained at $q=$ with $f(e^{-\frac{1}{2}}) \approx 0.113$.
Does anyone has an idea or a simple approach how to show the above estimate?
 A: Let
$$s_q(N):=\sum_{n=0}^N f_q(n),\quad t_q(N):=\sum_{n=1}^N g_q(n),$$
where
$$f_q(n):=(4n+1)q^{(4n+1)^2/4},\quad g_q(n):=(4n-1)q^{(4n-1)^2/4}.$$
We want to show that
$$s_q(\infty)-t_q(\infty)\overset{\text{(?)}}\ge1/10 \tag{1}$$
for all
$$q\in[e^{-2},e^{-1/2}]. \tag{2} $$
For such $q$, $g_q(n)$ is decreasing in $n\ge1$ and increasing in $q$, and hence
$$t_q(\infty)-t_q(2)
=\sum_{n=3}^\infty g_q(n) \\
<\int_2^\infty g_{e^{-1/2}}(u)\,du=e^{-49/8}.$$
So, for $q$ as in (2),
$$
\begin{aligned}
&s_q(\infty)-t_q(\infty) \\
&>s_q(2)-t_q(2)-e^{-49/8} \\
&=h(q):=9 q^{81/4}-7 q^{49/4}+5 q^{25/4}-3 q^{9/4}+q^{1/4}-e^{-49/8} \\ 
&\ge h(e^{-1/2})>1/10;
\end{aligned}
\tag{3}$$
the penultimate inequality, $h(q)\ge h(e^{-1/2})$, in the above multiline display is easy to prove, since $h(q)$ is a simple polynomial in $q^{1/4}$ (see a proof below).
So, (1) indeed holds for all $q$ as in (2).

Proof of the inequality $h(q)\ge h(e^{-1/2})$ for $q$ as in (2): For $u\in[e^{-1/2},e^{-1/8}]$, let
$$H(u):=h(u^4),\quad H_2(u):=\frac{H''(u)}{24u^7},
\quad H_3(u):=\frac{H_2'(u)}{80 u^{15}},$$
$$ 
H_4(u):=\frac{H_3'(u)}{168 u^{23}}=729 u^{32}-49\le H_4(e^{-1/8})<0.$$
So, $H_3$ is decreasing (on $[e^{-1/2},e^{-1/8}]$), to $H_3(e^{-1/8})>0$. So, $H_3>0$ and hence $H_2$ is increasing, from $H_2(e^{-1/2})<0$ to $H_2(e^{-1/8})>0$.
So, for some $c\in(e^{-1/2},e^{-1/8})$, $H$ is concave on $[e^{-1/2},c]$ and convex on $[c,e^{-1/8}]$. Also, $H(e^{-1/2})>H(e^{-1/8})$ and $H'(e^{-1/8})<0$.
So, $H(u)\ge H(e^{-1/8})$ for $u\in[e^{-1/2},e^{-1/8}]$ --  that is, $h(q)\ge h(e^{-1/2})$ for $q$ as in (2). $\quad\Box$
