# Indefinite integral (Hermite polynomials)

• PhysicsMark
Thanks for catching my mistake! So after scouring the internet (I wasn't able to figure out the quantity by searching or using the 2 bits of information), and putting together all I found, I think that the integral

## Homework Statement

I need to evaluate the following integral:

$$\int_{-\infty}^{\infty}x^mx^ne^{-x^2}dx$$

I need the result to construct the first 5 Hermite polynomials.

## The Attempt at a Solution

First I tried arbitrary values for "m" and "n". I was not able to evaluate the integral when (m+n) was even. I found that when (m+n) is odd, the integral is equal to 0. This makes sense since e^(-x^2) is an even function.

Then I looked it up. Using wolfram integral calculator left me with something known as the incomplete gamma function (Not very sure what that is) in the solution. Maple gave me a very long answer that involved something labeled as Whittaker M.

Finally I went to my professor to ask him how to evaluate it. He said that it is an integral that can be looked up and I should have a square root pi in my answer. He also said that the incomplete gamma function should not be there.

I am not too sure of how to evaluate the integral myself. Maybe more importantly, I am not sure where to find the result of the integral if it can indeed be "looked up". Thanks for reading.

When the integrand is even, you can rewrite it with limits from 0 to infinity. Then use the substitution u=x^2, and it'll be in the form of a gamma function.

Thanks vela!

I am not sure how the gamma function works. I have just looked over articles pertaining to it online, but I am not confident enough in my understanding of it to be able to identify it in this case.

Here is what I have following vela's advice:

$$\int_{0}^{\infty}x^{2n}e^{-x^2}dx$$

Letting u=x^2 I get:

$$\int_{0}^{\infty}\frac{u^{n-1}}{2}e^{-u}du$$

Integrating by parts yields:

$$\int_{0}^{\infty}\frac{u^{n-1}}{2}e^{-u}du= -\frac{u^{n-1}e^{-u}}{2}+\int_{0}^{\infty}\frac{(n-1)u^{n-2}}{2}e^{-u}du$$

Integrating by parts yields more repeating integrals (as far as I can tell from here). Each time I integrate by parts I can pull out a factor. For the first one it was:

$$\frac{n-1}{2}$$

The next factor (I guess I'm talking about the coefficient of the "uv" of the integration by parts...if you use uv-int(vdu)) I get is:

$$\frac{(n-1)(n-2)}{2}$$

This keeps repeating. I see that according to wikipedia, the gamma function can be defined as:

$$\Gamma(n)=(n-1)!$$

As of this point, I do not see how this will get me where I want to go. I am looking for the result of this integral in order to establish rules to determine the orthogonality relationships between (x^m,x^n).

For instance when finding the Legendre polynomials, I found that when (m+n) was odd, (x^m,x^n) = 0. When (m+n) was even, (x^m,x^n) = (2/(m+n+1)). I determined this by performing the integral in the first post. The difference being the weight function.

Thanks again for taking the time to read this.

You made a mistake when you did the substitution. Because du=2x dx, you should get

$$\frac{1}{2}\int_0^\infty u^{n-1/2}e^{-u} du = \frac{1}{2}\int_0^\infty u^{(n+1/2)-1} e^{-u} du = \frac{1}{2}\Gamma(n+\frac{1}{2})$$

You can look up what that evaluates to, or deduce it using the facts that $\Gamma(n+1)=n\Gamma(n)$ and $\Gamma(1/2) = \sqrt{\pi}$.

I didn't realize you weren't familiar with the gamma function. I would have suggested a different way to go about this integral. For instance, you could use the trick where you say

$$\int x^{2n} e^{-x^2} dx = \left[\int (-1)^n \frac{d^n}{d\alpha^n} e^{-\alpha x^2} dx\right]_{\alpha=0}$$

and then interchange the order of integration and differentiation. But then again, that's kind of tedious, so maybe learning about the gamma function isn't so bad. :)

Thanks for catching my mistake! So after scouring the internet (I wasn't able to figure out the quantity by searching or using the 2 bits of information) and putting together all I found, I think:

$$\Gamma(n+\frac{1}{2})=\frac{2n!}{n!2^{2n}}\sqrt\pi$$

I realize the above quantity needs to be multiplied by 1/2 to get the quantity I am looking for. Is this correct? If so, can it be simplified. I tried but so far have not been able to re-write it. In fact, I was only able to get the above equation by putting 3 or so different equations together. I don't fully understand why the (pi)^.5 can "come out" of the gamma function.

Also, I didn't understand your other method of finding this relation. How could you do this without knowledge of the gamma function?

PhysicsMark said:
Thanks for catching my mistake! So after scouring the internet (I wasn't able to figure out the quantity by searching or using the 2 bits of information) and putting together all I found, I think:

$$\Gamma(n+\frac{1}{2})=\frac{2n!}{n!2^{2n}}\sqrt\pi$$

I realize the above quantity needs to be multiplied by 1/2 to get the quantity I am looking for. Is this correct? If so, can it be simplified. I tried but so far have not been able to re-write it. In fact, I was only able to get the above equation by putting 3 or so different equations together. I don't fully understand why the (pi)^.5 can "come out" of the gamma function.
I think it's right. Wikipedia's page on the gamma function actually has the result you were looking for, although it's written slightly differently.

When n=0, the integral reduces to a gaussian. That's why you get the square root of pi in the answer.
Also, I didn't understand your other method of finding this relation. How could you do this without knowledge of the gamma function?
It's just a common trick for doing these sorts of integrals. There's a mistake in what I wrote. You want to set alpha=1 at the end, not to zero.

Now it seems that I either have the wrong solution, or I do not know what I am doing. When I use the relation :

$$\int_0^\infty{x^m}x^n{e^{-x^2}dx=\frac{1}{2}((m+n)-1/2)!$$ if (m+n) = even

I'm assuming the gamma function below is equal to the right hand side above

$$\frac{1}{2}\Gamma(n+\frac{1}{2})=\frac{1}{2}\frac{2n!}{n!2^{2n}}\sqrt\pi$$

I thought this value would allow me to generate the first few Hermite polynomials but I am not sure now how to do that.

Using the Schmidt orthogonalization process, as outlined in my tutorial, I take:

$$H_0(x)=\frac{x^0}{\sqrt{(x^0,x^0)}}$$

Using the above equations for n=0 gives me:

$$(x^0,x^0)=\frac{\sqrt{\pi}}{2}$$

Shouldn't the first polynomial = 1?

To continue, the next step is to take

$$H_1(x)=x^1+\alpha{H_0}$$

and solve for alpha to find H_1. Am I doing something incorrect here?

Last edited:
PhysicsMark said:
Shouldn't the first polynomial = 1?
The difference is normalization. The Gram-Schmidt method needs the functions to be normalized such that (Hn,Hn)=1, but the Hermite polynomials are typically normalized to make them more convenient to use. The http://en.wikipedia.org/wiki/Hermite_polynomials" [Broken] discusses this a bit. What you will find using your method are polynomials that are proportional to the Hermite polynomials.

Last edited by a moderator: