I would like to compute the following (semi-definite?) integral
$$\int_2^n \frac{1}{x}\cdot e^{\frac{1}{x^2}} \;\text{d}x \;\;\; \text{ for } n\in \mathbb{R}\,.$$
Wolfram gives the following for the indefinite integral, and nothing for the exact input:
$$-\frac{\operatorname{Ei}(\frac{1}{x^2})}{2} + C$$ with the plot looking like
I understand the problem arises for computing the indefinite integral in terms of elementary functions due to issues around zero which is why the result is in terms of the exponential integral, however are there no tricks to get some analytical result in terms of elementary functions for values greater than $2$?
We cannot have elementary results because the integrand has no elementary antiderivative.
To elaborate on this, we first compute the integral $$\int_2^n\frac1x{e^{1/x^2}}dx=\frac12\big(\text{Ei}(1/4)-\text{Ei}(1/n^2)\big).$$ Suppose we do have an elementary result, for example, $$\int_2^n\frac1x{e^{1/x^2}}dx=F(n)$$ for some elementary function $F(n)$. Then it follows $\text{Ei}(1/n^2)=\text{Ei}(1/4)-2F(n)$. The term $\text{Ei}(1/4)$ is a constant and $F(n)$ is elementary, therefore $\text{Ei}(1/n^2)$ must also be elementary, but we know this is a contradiction because $\text{Ei}$ is not elementary. As a result, we cannot have elementary results for the integral.
However, we can approximate the integral using elementary functions. For example, we have the Taylor expansion $\text{Ei}(1/n^2)=\gamma-2\log(n)+\mathcal O(1/n^2)$ where $\gamma\approx0.57721$ is Euler's constant. Then the integral follows $$\int_2^n\frac1x{e^{1/x^2}}dx=\ln(n)+C+\mathcal O(1/n^2)$$ with $C=(\text{Ei}(1/4)-\gamma)/2\approx-0.559879$. This means for sufficiently large $n$, we get the asymptotic expression $$\int_2^n\frac1x{e^{1/x^2}}dx\approx\ln(n)+C.$$