# An Exponential Integral

#### mathworker

##### Well-known member
I am trying to evaluate the following integral. Any help would be appreciated.
$$\int e^{x^2}dx$$
i tried the following,
$$x^2=t$$
$$2xdx=dt$$
$$\int\frac{e^t}{2\sqrt{t}}dt$$
i tried doing by parts but it didn't work

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
Re: an exponential integral

Unfortunately this integral has no closed form , we can define the integral in terms of the Error function

Let the following

$$\displaystyle \int^x_0 e^{t^2} \, dt$$

Now use the sub $$\displaystyle t=iu$$

$$\displaystyle i\int^{-ix }_0 e^{-u^2} \, du = i \frac{\sqrt{\pi}}{2}\, \text{erf}(-ix) =- i \frac{\sqrt{\pi}}{2}\, \text{erf}(ix) = \frac{\sqrt{\pi}}{2} \, \text{erfi}(x)$$

#### Bacterius

##### Well-known member
MHB Math Helper
Re: an exponential integral

[JUSTIFY]I agree with ZaidAlyafey. If you want, you can try to show that differentiating $\frac{1}{2} \sqrt{\pi} \text{erfi}(x)$ gives $e^{x^2}$. To do this, use the power series representation of $\text{erfi}(x)$. Differentiate using the properties of derivatives, and equate it to the power series of $e^{x^2}$

That would be a valid proof thanks to the FTC (somewhat uninsightful, though, since $\text{erf}(x)$ and variants are defined in terms of the Gaussian integral).[/JUSTIFY]

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
Re: an exponential integral

What is so nice about the Error function is the following properties

• $$\displaystyle \text{erf}(\bar{z}) = \overline { \text{erf}(z) }\\$$
• $$\displaystyle \text{erf}(-z) = - \text{erf(z) }$$

where the bar represents the complex conjugate .

#### Prove It

##### Well-known member
MHB Math Helper
Re: an exponential integral

how to find the following integral,help would be appreciated
$$\int e^{x^2}dx$$
i tried,
$$x^2=t$$
$$2xdx=dt$$
$$\int\frac{e^t}{2\sqrt{t}}dt$$
i tried doing by parts but it didn't work
It doesn't have a closed form solution in terms of the elementary functions, but if you want, you can get a series solution.

\displaystyle \displaystyle \begin{align*} e^X &= \sum_{n = 0}^{\infty} { \frac{X^n}{n!} } \\ \textrm{ so } e^{x^2} &= \sum_{n = 0}^{\infty} { \frac{\left( x^2 \right) ^n }{n!} } \\ &= \sum_{n = 0}^{\infty} { \frac{x^{2n}}{n!} } \\ \int{ e^{x^2}\,dx} &= \int{ \sum_{n = 0}^{\infty} {\frac{x^{2n}}{n!}} \, dx } \\ &= \sum_{n = 0}^{\infty} { \frac{x^{2n+1}}{\left( 2n + 1 \right) \, n!} } + C \end{align*}

#### Prove It

##### Well-known member
MHB Math Helper
Just because the OP might find this interesting, even though this function does not have an elementary antiderivative, a similar function, the Gaussian Function \displaystyle \displaystyle \begin{align*} e^{-x^2} \end{align*} also does not have an elementary antiderivative, and so in general can not be exactly integrated over two values, but DOES have an exact definite integral over the entire real number line, \displaystyle \displaystyle \begin{align*} \int_{-\infty}^{\infty}{e^{-x^2}\,dx} = \sqrt{\pi} \end{align*}

Proof: Consider integrating over the real plane \displaystyle \displaystyle \begin{align*} \int{ \int_{\mathbf{R}^2}{e^{-\left( x^2 + y^2 \right) }} \, dA } \end{align*}. If we convert to polars, since we are integrating over the entire plane, the radii can extend out indefinitely and all angles can be swept out. So

\displaystyle \displaystyle \begin{align*} \int{ \int_{\mathbf{R}^2} {e^{-\left( x^2 + y^2 \right) } }\,dA } &= \int_{-\infty}^{\infty}{\int_{-\infty}^{\infty}{ e^{-\left( x^2 + y^2 \right) } \,dx}\,dy} \\ &= \int_0^{2\pi}{\int_0^{\infty}{e^{-r^2}\,r\,dr}\,d\theta} \\ &= -\frac{1}{2}\int_0^{2\pi}{\int_0^{\infty}{e^{-r^2} \left( -2r \right) \, dr}\,d\theta} \\ &= -\frac{1}{2}\int_0^{2\pi}{\int_0^{-\infty}{e^u\,du}\,d\theta} \textrm{ after substituting } u = -r^2 \\ &= \frac{1}{2}\int_0^{2\pi}{\int_{-\infty}^0{e^u\,du}\,d\theta} \\ &= \frac{1}{2}\int_0^{2\pi}{\lim_{\epsilon \to -\infty}\int_{\epsilon}^0{e^u\,du}\,d\theta} \\ &= \frac{1}{2}\int_0^{2\pi}{\lim_{\epsilon \to -\infty} \left[ e^u \right]_{\epsilon}^0 \,d\theta} \\ &= \frac{1}{2}\int_0^{2\pi}{e^0 - \lim_{\epsilon \to -\infty}e^{\epsilon}\,d\theta} \\ &= \frac{1}{2}\int_0^{2\pi}{1 - 0\,d\theta} \\ &= \frac{1}{2}\int_0^{2\pi}{1\,d\theta} \\ &= \frac{1}{2} \left[ \theta \right] _0^{2\pi} \\ &= \frac{1}{2} \left( 2\pi - 0 \right) \\ &= \frac{1}{2} \left( 2\pi \right) \\ &= \pi \end{align*}

But if we attempt to integrate using Cartesians

\displaystyle \displaystyle \begin{align*} \int{\int_{\mathbf{R}^2}{e^{-\left( x^2 + y^2 \right) }}\,dA} &= \int_{-\infty}^{\infty}{\int_{-\infty}^{\infty}{e^{-\left( x^2 + y^2 \right) }\,dx}\,dy} \\ &= \int_{-\infty}^{\infty}{\int_{-\infty}^{\infty}{e^{-x^2 - y^2}\,dx}\,dy} \\ &= \int_{-\infty}^{\infty}{\int_{-\infty}^{\infty}{e^{-x^2}e^{-y^2}\,dx}\,dy} \\ &= \left( \int_{-\infty}^{\infty}{e^{-x^2}\,dx} \right) \left( \int_{-\infty}^{\infty}{e^{-y^2}} \, dy \right) \\ &= \left( \int_{-\infty}^{\infty}{e^{-x^2}\,dx} \right) ^2 \textrm{ as the two integrals are identical and so are numerically equal} \end{align*}

Equating the two results, we find

\displaystyle \displaystyle \begin{align*} \left( \int_{-\infty}^{\infty}{e^{-x^2}\,dx} \right) ^2 &= \pi \\ \int_{-\infty}^{\infty}{e^{-x^2}\,dx} &= \sqrt{\pi} \end{align*}

Q.E.D.