Second order correction to $ {\epsilon} +{\epsilon^{1/2}}+{\epsilon^{1/3}}+\dots+{\epsilon^{1/(-b\ln \epsilon)}}$? Background
I recently asked myself the following where $\epsilon > 0$ and $b > 0$
$$ {\epsilon} +{\epsilon^{1/2}}+{\epsilon^{1/3}}+\dots+{\epsilon^{1/(-b\ln \epsilon)}} = ?$$
After some fiddling around I was able to show:
$$ {\epsilon} +{\epsilon^{1/2}}+{\epsilon^{1/3}}+\dots+{\epsilon^{1/(-b\ln \epsilon)}} \sim - \ln(\epsilon) \times \int_0^{b} e^{-1/|x|} dx$$
Question
Is my fiddling correct? I suspect there is an $(\ln \epsilon)^2$ term as well but I cannot find it. Any help?
My Fiddling
Consider:
$$ f(x) = e^{-1/x} $$
Now,
$$ \int_0^b f(x) dx = \lim_{\delta \to 0} \sum_{n=1}^{N} f(n \delta) \delta $$
with $N = \frac{b}{\delta}$ and $\delta> 0$. Let us replace $\delta =\frac{-1}{\ln(\epsilon)}$
$$ \int_0^b f(x) dx = \lim_{\epsilon \to 0} \sum_{n=1}^{N} f\left(\frac{-1}{\ln ( \epsilon^{1/n})} \right) \frac{-1}{\ln \epsilon} $$
with $N=-b \ln(\epsilon)$. Substituting $f(x)$:
$$\int_0^b  e^{-1/x} = \lim_{\epsilon \to 0} \sum_{n=1}^{N} \epsilon^{1/n} \frac{1}{\ln \epsilon} $$
Using asymptotics:
$$ - \ln \epsilon  \int_0^b  e^{-1/x} \sim  {\epsilon} +{\epsilon^{1/2}}+{\epsilon^{1/3}}+\dots+{\epsilon^{1/N}} $$
 A: Your approximation is (now) fine. The next-order correction should take into account the continuity correction in the integral.
Notice first that, using the trapezoid rule, the last term in the sum should be divided by two. (The first term does not matter, because the function starts at zero).
But notice also that, assuming $\epsilon, b$ are given, $-b \ln \epsilon$ is not an integer in general. Then, the last index of the sum is actually given by a rounding to the nearest integer  $ N = \lfloor N' \rceil = \lfloor  -b \ln \epsilon\rceil$.
Let $d = N - N'$, with $-\frac12 \le d \le \frac12$.
Then the integral is better approximated by
$$ \int_0^b  e^{-1/x} dx \approx \frac{-1}{\ln \epsilon} \left( \epsilon + \epsilon^{1/2} + \epsilon^{1/N}\right)- \frac{-1}{\ln \epsilon} \epsilon^{1/N}(d+1/2) \tag2$$
Or
$$\left( \epsilon + \epsilon^{1/2} + \epsilon^{1/N}\right) \approx -\ln \epsilon \int_0^b  e^{-1/x} dx - \epsilon^{1/N}(d+1/2) \tag 2$$
The graph compares the approximation in $(2)$ for $b=5$ (yellow line the zero order approximation; the red line, the corrected one, is indistinguishable from the exact integral value: $2.87100322120604$). The abscisa corresponds to $1/\epsilon$; in that range of values we get $N=37,38,39$.

