# How to integrate $e^{x^2}$? [duplicate]

I am stuck in this problem of integrating $e^{x^2}$. I was solving the linear differential equation of second order for damped oscillations in which i got this to solve

• $e^{x^2}$ or $({e^x})^2$? Mar 10, 2016 at 7:37
• If you are integrating over the reals, it becomes $-i\sqrt{\pi}$ Mar 10, 2016 at 7:57

The integral of the function $f(x)= e^{x^2}$ cannot be expressed in terms of elementary functions.
The integral can be given in terms of the imaginary error function, $\text{erfi}(x)$, which is defined as: $$\text{erfi}(x) = \frac{2}{\sqrt{\pi}}\int_{0}^{x} e^{t^2} dt$$