# Integral of x^2*exp(x^2) using erfc tables

Can anybody show me how to integrate x^2*exp(-x^2) between the limits 0 to infinity(symbol=00) and 1.5 to infinity with detail steps. I want this by using error function table. I know the 'multiplying integral method'. Here is what I did so far
int(0,00) x^2*exp(-x^2)
=x^2*int(0,00)exp(-x^2)-int(0,00)[2*x*int(0,00)exp(-x^2)]
=x^2(pi^0.5/2)-int(0,00)[2*x*(pi^0.5/2)] ...first term also between (0,00)
This seems to be giving 00! Where am I missing?
Thanks.

Also please show me how to do this between limits (1.5,00) with error function tables.

Last edited:

alxm
Did you get that right? $$x^2e^{x^2}$$ is divergent, those integrals will be $$\infty$$.

Did you get that right? $$x^2e^{x^2}$$ is divergent, those integrals will be $$\infty$$.
Oh, I am terribly sorry. I meant x^2*exp(-x^2). Forgot the negative sign. I corrected the original post (could not correct the Sub line). Thanks.

alxm
Hmm, okay. Well what I'd do is first do a substitution, e.g.
$$y = x^2$$
Resulting in:
$$\frac{1}{2}\int\sqrt ye^{-y}dy$$
Then use partial integration which will land you with a infinite series for the indefinite integral.

For the case of:
$$\frac{1}{2}\int^\infty_0\sqrt ye^{-y}dy$$ you can 'cheat' and note that it's $$= \frac{1}{2}\Gamma(1.5)$$

Hmm, okay. Well what I'd do is first do a substitution, e.g.
$$y = x^2$$
Resulting in:
$$\frac{1}{2}\int\sqrt ye^{-y}dy$$
Then use partial integration which will land you with a infinite series for the indefinite integral.

For the case of:
$$\frac{1}{2}\int^\infty_0\sqrt ye^{-y}dy$$ you can 'cheat' and note that it's $$= \frac{1}{2}\Gamma(1.5)$$
alxm, I don't know whether your approach is correct. But its pretty straightforward with 'multiplying integration'. You can find a method somewhere on the web.

My problem is trying to use error function approach.

Hello ronphysics,

You need to use the following four equations in order to solve it the way you want. These are:

$$\int_0^{\infty}e^{-ax^2}dx=\frac{1}{2}\sqrt{\frac{\pi}{a}}$$
$$erf(x)=\frac{2}{\sqrt{\pi}}\int_0^{x} e^{-t^2}dt$$
$$erfc(x)=\frac{2}{\sqrt{\pi}}\int_{x}^{\infty} e^{-t^2}dt$$
$$erf(x)=1-erfc(x)$$

Now I will show how to obtain the general question as:

$$I=\int_{\beta}^{\infty}x^2e^{-x^2}dx$$

Afterwards you need to find for yourself the solution to your integrals, and additionally check them by using the definite numbers for $\beta$. If any problems occur, just post. OK, so the first step is to use partial integration. This gives:

$$I=\int_{\beta}^{\infty}x^2e^{-x^2}dx= -\int_{\beta}^{\infty}\frac{x}{2}d\left(e^{-x^2}\right)= -\left[\frac{x}{2}e^{-x^2}\right]_{\beta}^{\infty}+\frac{1}{2}\int_{\beta}^{\infty}e^{-x^2}dx= \frac{\beta}{2}e^{-{\beta}^2}+\frac{1}{2}erfc(\beta)\frac{\sqrt{\pi}}{2}$$

Therefore, after rewriting:

$$I=\frac{\beta}{2}e^{-{\beta}^2}+\frac{\sqrt{\pi}}{4}erfc({\beta})= \frac{\beta}{2}e^{-{\beta}^2}+\frac{\sqrt{\pi}}{4}\left(1-erf({\beta})\right)$$

Is this the method you were looking for?

coomast

Hello ronphysics,

You need to use the following four equations in order to solve it the way you want. These are:

$$\int_0^{\infty}e^{-ax^2}dx=\frac{1}{2}\sqrt{\frac{\pi}{a}}$$
$$erf(x)=\frac{2}{\sqrt{\pi}}\int_0^{x} e^{-t^2}dt$$
$$erfc(x)=\frac{2}{\sqrt{\pi}}\int_{x}^{\infty} e^{-t^2}dt$$
$$erf(x)=1-erfc(x)$$

Now I will show how to obtain the general question as:

$$I=\int_{\beta}^{\infty}x^2e^{-x^2}dx$$

Afterwards you need to find for yourself the solution to your integrals, and additionally check them by using the definite numbers for $\beta$. If any problems occur, just post. OK, so the first step is to use partial integration. This gives:

$$I=\int_{\beta}^{\infty}x^2e^{-x^2}dx= -\int_{\beta}^{\infty}\frac{x}{2}d\left(e^{-x^2}\right)= -\left[\frac{x}{2}e^{-x^2}\right]_{\beta}^{\infty}+\frac{1}{2}\int_{\beta}^{\infty}e^{-x^2}dx= \frac{\beta}{2}e^{-{\beta}^2}+\frac{1}{2}erfc(\beta)\frac{\sqrt{\pi}}{2}$$

Therefore, after rewriting:

$$I=\frac{\beta}{2}e^{-{\beta}^2}+\frac{\sqrt{\pi}}{4}erfc({\beta})= \frac{\beta}{2}e^{-{\beta}^2}+\frac{\sqrt{\pi}}{4}\left(1-erf({\beta})\right)$$

Is this the method you were looking for?

coomast
coomast,

Thanks. Thats exactly what I was looking for. My mind was stuck in separating variables as x^2 and exp(-x^2). However, the useful way to seprate is x and x*exp(-x^2). Thanks again.

Hi all,

I am trying for the following integration

∫x2 exp(a0+a1x+a2x2) dx