# Expanding a function in Gaussian-Hermites

• alfredska
In summary, Alfredska found a way to expand a function in terms of a series of Hermites, but found that the coefficients were difficult to calculate. He attempted to solve the problem by including a weight function, but when he changed the function being expanded, the method still applied.

#### alfredska

Expanding a function in "Gaussian-Hermites"

This isn't homework or coursework, but seeing as it's most like a homework problem, I figured this would be the best place to ask.

Note that I'm using the physics

## Homework Statement

I would like to expand a function (let's take a gaussian for example) in terms of this series (very similar to the harmonic oscillator, except for a factor of 2 in the exponential):
$$s\left(x\right)=\sum_n\alpha_nH_n\left(x\right)\exp\left(-x^2\right)$$

## Homework Equations

To find the coefficients:
$$\alpha_n=\int_{-\infty}^{\infty}F\left(x\right)H_n\left(x\right)\exp\left(-x^2\right)dx/Normalization$$

where $$F\left(x\right)=\exp\left(-\frac{x^2}{\sigma^2}\right)$$ in my example

## The Attempt at a Solution

I have figured out the normalization of $$H_n\left(x\right)\exp\left(-x^2\right)$$
$$\alpha_n=\int_{-\infty}^{\infty}\left[H_n\left(x\right)\exp\left(-x^2\right)\right]^2dx=\sqrt{\frac{\pi}{2}}\left(2 n-1\right)!$$

but apparently I'm doing something wrong when I write:
$$\alpha_n=\frac{\int_{-\infty}^{\infty}\exp\left(-\frac{x^2}{\sigma^2}\right)H_n\left(x\right)\exp\left(-x^2\right)dx}{\sqrt{\sqrt{\frac{\pi}{2}}\left(2 n-1\right)!}}$$

Can you tell me where I'm making my mistake?

Last edited:
I looked for the Hermite series expansion in one of my books and this is what I came up with:

The function f(x) can be expanded as:

$$f(x)=\sum_{n=0}^{\infty}A_n\cdot H_n(x)$$

With:

$$A_n=\frac{1}{2^n n! \sqrt{\pi}} \int_{-\infty}^{+\infty} e^{-x^2}f(x) H_n(x)dx$$

And:

$$H_n(x)=(-1)^n e^{x^2}\frac{d^n}{dx^n}\left(e^{-x^2}\right)$$

It's getting late over here, I will try to check it tomorrow. I think you made a calculation error somewhere. However because the function f(x)=sin(x) is not a polynome, you have to calculate the general integral for n, otherwise it would have been a lot easier. We'll see after a nights sleep.

The $$A_n$$ you've listed is correct for expanding a function in a series of Hermites alone. Since I have a Gaussian tacked on my Hermites, my case is slightly different.

One place I've found out that I'm going wrong, is that the functions which I'm summing are not mutually orthonormal, they're not even orthogonal. Can this be resolved by including a weight function?

Last edited:
alfredska said:
One place I've found out that I'm going wrong, is that the functions which I'm summing are not mutually orthonormal, they're not even orthogonal. Can this be resolved by including a weight function?

I'm guessing $$w(x) = e^{x^2}$$ might work? Since it seems to reduce it to the orthogonality condition of the regular Hermite polynomials

You're right in that it reduces it down to the orthogonality case, but then s(x) would need the weight function thrown in as well, and I'm back to the harmonic oscillator.

alfredska, I didn't have time yet to look into it. I will try to do it this week, however I'm not giving any guarantee for a solution. Anyway, I'll come back to it.

Perhaps Solved

Ok, I believe I've figured out how to approach this problem. This is likely just another way of implementing weights, and siddharth was probably correct, but I still had to feel my way through it.

My approach:

Take
$$\exp\left(-\frac{x^2}{2}\right)$$
out of the summation and meld it into $$s\left(x\right)$$, defining a new function
$$g\left(x\right)=s\left(x\right)\exp\left(\frac{x^2}{2}\right)$$.

Now the summation is clearly identifiable as the harmonic oscillator, and
$$\alpha_n=\frac{\int_{-\infty}^{\infty}g\left(x\right)H_n\left(x\right)\exp\left(-\frac{x^2}{2}\right)dx}{\sqrt{2^nn!\sqrt{\pi}}}$$

After I find my coefficients, I only have to revert g(x) back to s(x)

This seems to be the right way to solve it. I will try to evaluate the integral for determining the coefficients. However what is the exact function, a sin or a Gauss function? There seems to be something changed if I'm not mistaken.

I did change the function

You're right coomast, I did change the function which is being expanded. The method should apply to either case though. For the sake of anyone who may stumble upon this thread, here are the results:

$$s\left(x\right)=\sum_n \alpha_n \frac{H_n\left(x\right)}{\sqrt{2^nn!\sqrt{\pi}}} \exp\left(-x^2\right)$$

$$\frac{s\left(x\right)}{\exp\left(-\frac{x^2}{2}\right)}=\sum_n \alpha_n \frac{H_n\left(x\right)}{\sqrt{2^nn!\sqrt{\pi}}} \exp\left(-\frac{x^2}{2}\right)$$

$$\alpha_n=\int_{-\infty}^{\infty} \frac{H_n\left(x\right)}{\sqrt{2^nn!\sqrt{\pi}}} \exp\left(-\frac{x^2}{2}\right) \frac{s\left(x\right)}{\exp\left(-\frac{x^2}{2}\right)} dx$$

$$\alpha_n=\int_{-\infty}^{\infty} \frac{H_n\left(x\right)}{\sqrt{2^nn!\sqrt{\pi}}} s\left(x\right) dx$$

Thanks for you interest.
~Matt

Last edited:

## 1. What is a Gaussian-Hermite function?

A Gaussian-Hermite function is a type of mathematical function used in statistics and physics. It is a combination of a Gaussian function (also known as a normal distribution) and a Hermite polynomial. The Gaussian-Hermite function is often used to model the probability distribution of physical systems with random fluctuations.

## 2. How is a function expanded in Gaussian-Hermites?

To expand a function in Gaussian-Hermites, the function is first rewritten as a linear combination of Hermite polynomials, with the coefficients determined by integrating the function against the Hermite polynomials. This results in a series of terms, each with a different degree of the Hermite polynomial. The series is then truncated at a certain degree, depending on the accuracy needed for the specific application.

## 3. What are the benefits of expanding a function in Gaussian-Hermites?

Expanding a function in Gaussian-Hermites allows for a more accurate representation of the function, as it takes into account the random fluctuations in the physical system. This is particularly useful in applications such as quantum mechanics and statistical mechanics, where these fluctuations play a significant role.

## 4. Are there any limitations to using Gaussian-Hermites to expand a function?

One limitation of using Gaussian-Hermites to expand a function is that it is only applicable to functions that can be expressed as a linear combination of Hermite polynomials. Additionally, the accuracy of the expansion depends on the degree of the Hermite polynomial used, so choosing an appropriate degree is important.

## 5. How is the accuracy of a Gaussian-Hermite expansion determined?

The accuracy of a Gaussian-Hermite expansion is typically determined by comparing the results of the expansion to the exact solution, when it is known. This can be done by calculating the error between the two and adjusting the degree of the Hermite polynomial used until a desired level of accuracy is achieved.