How to integrate $\int a^{-x^2} dx$? In Calculus Made Easy, by Silvanus Thompson (published 1914), it is stated that no one has found a general way to integrate:
$$\int a^{-x^2} dx$$
Well, time flies and a hundred years have come and gone. Has anyone found an analytic solution for this one yet?
 A: Since $$a^{-x^2}=e^{-x^2\log(a)}$$ change variable $$x^2\log(a)=y^2\implies x=\frac y{\sqrt{\log(a)}}\implies dx=\frac {dy}{\sqrt{\log(a)}}$$ to make $$\int a^{-x^2}\,dx=\frac{1}{\sqrt{\log (a)}}\int e^{-y^2}\,dy=\frac{\sqrt{\pi } }{2 \sqrt{\log (a)}}\text{erf}(y)=\frac{\sqrt{\pi } }{2 \sqrt{\log (a)}}\text{erf}\left(x \sqrt{\log (a)}\right)$$ For sure, depending on the value of $a$, some problem "could" happen.
If $a <1$, the result would be $$\frac{\sqrt{\pi } }{2 \sqrt{-\log (a)}}\text{erfi}\left(x \sqrt{-\log (a)}\right)$$
A: I looked at the book. As from 1914 it is now available with no copyright from Google (everything before around some 192X is public domain in USA.). I would believe this author is mistaken. Joseph Liouville lived well before that time, in the early part of the 19th century and came up with Liouville's theorem of differential Galois theory which can be used to prove that it is not possible to integrate this in terms of elementary functions. I suspect this author was ignorant of this result. (Nonetheless I like the flowery, expressive language in the book :) Too bad things are so dry now.) It would have been better to say that it has been proven that it cannot be a derivative of any elementary functions.
The error function was mentioned in the comments. This is defined to be, up to a constant scale factor, the integral of this for $a = e$:
$$\mathrm{erf}(x) = K \int_{0}^{x} e^{-t^2} dt$$
where $K$ is suitably chosen so $\mathrm{erf}(\infty) = 1$.  This makes $K = \frac{2}{\sqrt{\pi}}$ if I remember right. (To find this factor you need to do the famous "Gaussian Integral" which takes the above integral with upper bound $\infty$ and no $K$ out in front. There's a lot of ways to do this, one nice one of which would be accessible to someone who finished basic multivariable calculus is a trick involving polar coordinates.)
With this you can integrate by using $a^x = e^{x \ln(a)}$ and suitable substitutions.
That's how it often works, if you can't find something that differentiates to it, but you need it bad enough, then you make up something that does :) The 2nd portion of the Fundamental Theorem of Calculus provides all you need to do just that.
A: First of all let's pass in exponential form
$$\int a^{-x^2}\ \text{d}x = \int e^{-x^2\ln(a)}\ \text{d}x$$
Now we make the strong assumption on which, since it's an indefinite integral, we can use Taylor series and the integral becomes
$$\int \sum_{k = 0}^{+\infty} \frac{(-x^2\ln(a))^k}{k!}\ \text{d}x$$
Arrange it to get
$$\sum_{k = 0}^{+\infty} (-1)^k \frac{\ln^k(a)}{k!}\int x^{2k}\ \text{d}x$$
The integration is trivial, and you get at the end
$$\sum_{k = 0}^{+\infty} (-1)^k \frac{\ln^k(a)}{k!} \frac{x^{2k+1}}{2k+1}$$
This sum can be summed, and it does converge to
$$\frac{\sqrt{\pi } \text{erf}\left(x \sqrt{\ln (a)}\right)}{2 \sqrt{\ln (a)}}$$
Where ERF denotes the special function called ERROR FUNCTION.
More here on the Erf
https://en.wikipedia.org/wiki/Error_function
