Integrate $(ax)^{-x}$ I need to find the asymptotics of the following expression as $r\to\infty$:
$$\int_{r^2+r}^\infty e^{-r^2}\Big(\frac{er^2}{x}\Big)^x \,dx.$$
Clearly,
$$\int_{3r^2}^\infty \Big(\frac{er^2}{x}\Big)^x \,dx \to 0,$$
so the main contribution comes from the part near the lower bound. Estimating
$$\int_{r^2+r}^{r^2+Cr} \Big(\frac{er^2}{x}\Big)^x\, dx$$
yields a lower bound of order $Cr$.
My guess is that the above integral behaves like $r\log r$ but I have no idea how to show this.
 A: The correct asymptotics, for $r \to \infty, $ is 
$$ \exp{(-r^2)} \int_{r^2}^\infty \big( e\,r^2/x\big)^x\,dx \sim 
\sqrt{\frac{\pi}{2}}\,r + \frac{1}{3}. $$
Note the lower limit has been change from $r^2+r$ to $r^2,$ which is trivial since $r^2$ dominates $r.$  For convenience in the proof, let $p=r^2.$  We'll make a series of integral transformations to get the integral in a 'good' form.
$$I(p):= e^{-p} \int_{p}^\infty \big( e\,p/x\big)^x\,dx =
 e^{-p} \int_{0}^{\large{e^p}} \frac{du}{1+W(-a\,\log{u} )}\, , \,a=1/(e\,p)$$
where the substitution $u=(a\,x)^{-x}$ has been made and the $W$ is the Lambert W function on the appropriate (all real) branch.
Make the substitution $t = \log{u}$ and then scale to find the exact expression
$$I(p)= p\,e^{-p} \int_{-\infty}^{1} \frac{e^{p\,t}\,dt}{1+W(-t/e )}
\sim p\,e^{-p} \int_{0}^{1} \frac{e^{p\,t}\,dt}{1+W(-t/e )}.$$  The approximation is valid because $\exp{(p\,t)}$ is exponentially small for negative $t.$ Because $\exp{(p\,t)}$ rapidly grows it is most important to know how the integrand behaves at the endpoint $t=1.$  Now the Lambert W function has a square root expansion as t goes to 1 from smaller positive numbers,
$$W(-t/e)=-1+\sqrt{2(1-t)} - 2/3(1-t)+... $$
so therefore
$$I(p) \sim p\,e^{-p}\int_{0}^{1} e^{p\,t}\Big( \frac{1}{3} + 
\frac{1}{\sqrt{2(1-t)}} \Big) dt =  
 p\,e^{-p}\Big(\frac{e^p-1}{3p}+
e^p\sqrt{\frac{\pi}{2p}}erf{(\sqrt{p})} \Big).$$  The error function goes to 1 with exponentially small terms as a remainder, and the first term of the last expression has an exponentially small term, all of which will be dropped.  Therefore 
  $$ I(p) \sim 
\sqrt{\frac{\pi \, p}{2}} + \frac{1}{3}. $$
Terms of order $p^{-1/2}, p^{-3/2},...$ can be found by using more terms in the branch cut expansion of the Lambert W.
A: Let $x = r^2 t, f(t) = r^2 t (1 - \ln t)$. The integral of $e^{f(t)}$ is determined by the maximum at $t = 1$, but we need to subtract the contribution from the interval $[1, 1 + 1/r]$:
$$f(t) = r^2 - \frac {r^2} 2 (t - 1)^2 + O((t - 1)^3), \\
e^{-r^2} \int_{r^2 + r}^\infty \left( \frac {e r^2} x \right)^x dx =
e^{-r^2} r^2 \int_{1 + 1/r}^\infty e^{f(t)} dt \sim \\
r^2 \int_{1 + 1/r}^\infty e^{-r^2 (t - 1)^2/2} dt =
r \sqrt \frac \pi 2 \operatorname{erfc} \frac 1 {\sqrt 2}.$$
