General formula for this weird Gaussian integral?

Click For Summary

Discussion Overview

The discussion revolves around finding a general formula for Gaussian integrals of the form $$\int_{-\infty}^{\infty}{x^n}{e^{-a(x-b)^2}}dx$$. Participants explore various methods and formulations related to this integral, including specific cases and substitutions, without reaching a consensus on a definitive formula.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • Some participants express a desire for a formula for the integral, noting existing results for simpler cases, such as $$\int_{-\infty}^{\infty}{e^{-a(x-b)^2}}dx=\sqrt{\frac{\pi}{a}}$$ and $$\int_{-\infty}^{\infty}{x}{e^{-a(x-b)^2}}dx=b{\sqrt{\frac{\pi}{a}}$$.
  • One participant proposes a method using partial integration and defines a recurrence relation for $$I_n = \int_{-\infty}^\infty x^n e^{-x^2}dx$$, suggesting that the power of \(x\) decreases by 2 with each iteration.
  • Another participant introduces a substitution approach, transforming the integral into a form involving Hermite polynomials and discusses the coefficients related to these polynomials.
  • Some participants question the applicability of certain methods for specific values of \(n\), particularly \(n=1\) and \(n=2\), and express confusion regarding the consistency of results with known formulas.
  • There are mentions of the confluent hypergeometric function in relation to moments of the normal distribution, suggesting a connection to the integrals being discussed.

Areas of Agreement / Disagreement

Participants do not reach a consensus on a general formula for the integral. There are multiple competing views and methods presented, with some participants questioning the validity of others' approaches and results.

Contextual Notes

Some limitations are noted, such as the dependence on specific values of \(a\) and \(b\) and the unresolved nature of certain mathematical steps in the derivations presented. The discussion also highlights the complexity of integrating polynomials multiplied by Gaussian functions.

Who May Find This Useful

This discussion may be useful for those interested in advanced calculus, particularly in the context of Gaussian integrals, mathematical physics, and statistical mechanics.

skate_nerd
Messages
174
Reaction score
0
Is there a formula for Gaussian integrals of the form
$$\int_{-\infty}^{\infty}{x^n}{e^{-a(x-b)^2}}dx$$
I've looked all over, and all I could find were formulas saying
$$\int_{-\infty}^{\infty}{e^{-a(x-b)^2}}dx=\sqrt{\frac{\pi}{a}}$$
and
$$\int_{-\infty}^{\infty}{x}{e^{-a(x-b)^2}}dx=b{\sqrt{\frac{\pi}{a}}}$$
via Wikipedia. Wolframalpha can do the integrals I want only if I plug in actual numbers for \(a\) and \(b\), but I am unable to tell from those answers what role the \(a\) and \(b\) play. Some guidance would be appreciated! Just a formula is what I'm looking for, no derivations.
 
Physics news on Phys.org
skatenerd said:
Is there a formula for Gaussian integrals of the form
$$\int_{-\infty}^{\infty}{x^n}{e^{-a(x-b)^2}}dx$$
I've looked all over, and all I could find were formulas saying
$$\int_{-\infty}^{\infty}{e^{-a(x-b)^2}}dx=\sqrt{\frac{\pi}{a}}$$
and
$$\int_{-\infty}^{\infty}{x}{e^{-a(x-b)^2}}dx=b{\sqrt{\frac{\pi}{a}}}$$
via Wikipedia. Wolframalpha can do the integrals I want only if I plug in actual numbers for \(a\) and \(b\), but I am unable to tell from those answers what role the \(a\) and \(b\) play. Some guidance would be appreciated! Just a formula is what I'm looking for, no derivations.

The method is partial integration:
$$\int u dv = uv - \int v du$$

Let's call:
$$I_n = \int_{-\infty}^\infty x^n e^{-x^2}dx$$

Then:
\begin{aligned}I_n &= \int x^n e^{-x^2}dx \\
&= \int x^n \cdot \frac{-1}{2x} d\left(e^{-x^2}\right) \\
&= -x^n \cdot \frac{-1}{2x} \cdot e^{-x^2}\Bigg|_{-\infty}^{\infty} - \int e^{-x^2} d\left(-\frac 1 2 x^{n-1}\right) \\
&= 0 + \frac {n-1} 2 \int x^{n-2} e^{-x^2} dx \\
&= \frac {n-1} 2 I_{n-2}
\end{aligned}

As you can see, the power of $x$ goes down by $2$.
That means that when solving the recurrence relation, it comes out as one of the 2 standard formulas.
 
skatenerd said:
Is there a formula for Gaussian integrals of the form
$$\int_{-\infty}^{\infty}{x^n}{e^{-a(x-b)^2}}dx$$
I've looked all over, and all I could find were formulas saying
$$\int_{-\infty}^{\infty}{e^{-a(x-b)^2}}dx=\sqrt{\frac{\pi}{a}}$$
and
$$\int_{-\infty}^{\infty}{x}{e^{-a(x-b)^2}}dx=b{\sqrt{\frac{\pi}{a}}}$$
via Wikipedia. Wolframalpha can do the integrals I want only if I plug in actual numbers for \(a\) and \(b\), but I am unable to tell from those answers what role the \(a\) and \(b\) play. Some guidance would be appreciated! Just a formula is what I'm looking for, no derivations.

With a simple substitution of variables the integral becomes...

$\displaystyle I = \int_{- \infty}^{+ \infty} \xi^{n}\ \ e^{- a\ (\xi- b)^{2}}\ d\xi = \int_{- \infty}^{+ \infty} \frac {1}{\sqrt{a}}\ (\frac{x}{\sqrt{a}} + b)^{n}\ e^{- x^{2}}\ dx = \int_{- \infty}^{+ \infty} f(x)\ e^{- x^{2}}\ dx\ (1)$

If f(x) is a polynomial of degree not greater that 2n - 1 then is...

$\displaystyle I = \sum_{k=1}^{n} A_{k}\ f(x_{k})\ (2)$

... where the $x_{k}$ are the zeroes of the n-th Hermite polynomial...$\displaystyle H_{n} (x) = (-1)^{n}\ e^{x^{2}}\ \frac{d^{n}}{d x^{n}} e^{- x^{2}}\ (3)$

... and the $A_{k}$ are...

$\displaystyle A_{k} = 2^{n+1}\ n!\ \frac{\sqrt{\pi}}{[H^{\ '}_{n} (x_{k})]^{2}}\ (4)$

Some Hermite Polynomials are...

$\displaystyle H_{1} (x) = 2\ x$

$\displaystyle H_{2} (x) = 4\ x^{2}- 2$

$\displaystyle H_{3} (x) = 8\ x^{3} - 12\ x$

... Kind regards $\chi$ $\sigma$
 
Last edited:
chisigma said:
With a simple substitution of variables the integral becomes...

$\displaystyle I = \int_{- \infty}^{+ \infty} \xi^{n}\ \ e^{- a\ (\xi- b)^{2}}\ d\xi = \int_{- \infty}^{+ \infty} \frac{1}{\sqrt{a}}\ (\frac{x}{\sqrt{a}} + b)^{n}\ e^{- x^{2}}\ dx = \int_{- \infty}^{+ \infty} f(x)\ e^{- x^{2}}\ dx\ (1)$

If f(x) is a polynomial of degree not greater that 2n - 1 then is...

$\displaystyle I = \sum_{k=1}^{n} A_{k}\ f(x_{k})\ (2)$

... where the $x_{k}$ are the zeroes of the n-th Hermite polynomial...$\displaystyle H_{n} (x) = (-1)^{n}\ e^{x^{2}}\ \frac{d^{n}}{d x^{n}} e^{- x^{2}}\ (3)$

... and the $A_{k}$ are...

$\displaystyle A_{k} = 2^{n+1}\ n!\ \frac{\sqrt{\pi}}{[H^{\ '}_{n} (x_{k})]^{2}}\ (4)$

Some Hermite Polynomials are...

$\displaystyle H_{1} (x) = 2\ x$

$\displaystyle H_{2} (x) = 4\ x^{2}- 2$

$\displaystyle H_{3} (x) = 8\ x^{3} - 12\ x$

... Kind regards $\chi$ $\sigma$

May be it is interesting to evaluate the case n=2. In this case is $\displaystyle H_{2} (x) = 4\ x^{2} - 2$, so that $\displaystyle x_{k} = \pm \frac{1}{\sqrt{2}}$ and $\displaystyle A_{k}= \frac{\sqrt{\pi}}{2}$, so that is...

$\displaystyle \int_{- \infty}^{\infty} \xi^{2}\ e^{- a\ (\xi-b)^{2}}\ d \xi = \sqrt{\frac{\pi}{a}}\ (\frac{1}{2\ a} + b^{2})\ (1)$

The polynomial $\displaystyle H_{2} (x)$ is useful also for the case n=3 and the task is left to You...

Kind regards

$\chi$ $\sigma$
 
Last edited:
Thanks everyone. I'm thinking that I Like Serena's post doesn't apply to my situation, correct? Though the derivation is interesting anyway since I haven't seen it before...

I think I am following this whole solution you have provided Chisigma. But just so I know if I am following correctly, are you sure that it isn't the case that for \(n=2\), \(A_k=\frac{\sqrt{\pi}}{2}\)? I went over it a few times in my head, and that's what I got...
 
skatenerd said:
Is there a formula for Gaussian integrals of the form
$$\int_{-\infty}^{\infty}{x^n}{e^{-a(x-b)^2}}dx$$
I've looked all over, and all I could find were formulas saying
$$\int_{-\infty}^{\infty}{e^{-a(x-b)^2}}dx=\sqrt{\frac{\pi}{a}}$$
and
$$\int_{-\infty}^{\infty}{x}{e^{-a(x-b)^2}}dx=b{\sqrt{\frac{\pi}{a}}}$$
via Wikipedia. Wolframalpha can do the integrals I want only if I plug in actual numbers for \(a\) and \(b\), but I am unable to tell from those answers what role the \(a\) and \(b\) play. Some guidance would be appreciated! Just a formula is what I'm looking for, no derivations.

For $$a>0$$ you are essentially asking for the moments $${\rm{E}}(X^n)$$ of the normal distribution, which may be written in terms of the confluent hypergeometric function $$U(\alpha,\beta,z)$$.

See the section on moments in the Wikipedia page for the normal distribution.

.
 
@ Chisigma:
Does your process not work for n=1? Or is there an error somewhere?
We would have
$$f(x)=(\frac{x}{\sqrt{a}}+b)^1$$
The only zero of the 1st Hermite polynomial is \(x_k=0\). We would also have
$$A_k={2^2}1!\frac{\sqrt{\pi}}{2^2}=\sqrt{\pi}$$

(also I am wondering, does \(A_k\) not even need to be included in the summation for \(I\) when the \(n^{th}\) Hermite polynomial only has one zero?)

So then we would have
$$I=\sqrt{\pi}(\frac{0}{\sqrt{a}}+b)=b\sqrt{\pi}$$
Which is not the same as the formula I had previously from Wikipedia:
$$\int_{-\infty}^{\infty}xe^{-a(x-b)^2}dx=b\sqrt{\frac{\pi}{a}}$$

And I tried checking the formula you got for n=2, and that didn't agree with any examples that I tried plugging into Wolframalpha.
 
skatenerd said:
@ Chisigma:
Does your process not work for n=1? Or is there an error somewhere?
We would have
$$f(x)=(\frac{x}{\sqrt{a}}+b)^1$$
The only zero of the 1st Hermite polynomial is \(x_k=0\). We would also have
$$A_k={2^2}1!\frac{\sqrt{\pi}}{2^2}=\sqrt{\pi}$$

(also I am wondering, does \(A_k\) not even need to be included in the summation for \(I\) when the \(n^{th}\) Hermite polynomial only has one zero?)

So then we would have
$$I=\sqrt{\pi}(\frac{0}{\sqrt{a}}+b)=b\sqrt{\pi}$$
Which is not the same as the formula I had previously from Wikipedia:
$$\int_{-\infty}^{\infty}xe^{-a(x-b)^2}dx=b\sqrt{\frac{\pi}{a}}$$

And I tried checking the formula you got for n=2, and that didn't agree with any examples that I tried plugging into Wolframalpha.

All right skatenerd!... I have been in a hurry and I made several mistakes!(Sadface)... First the right formula is...

$\displaystyle \int_{- \infty}^{+ \infty} \xi^{n}\ e^{- a\ (\xi-b)^{2}}\ d \xi = \int_{- \infty}^{+ \infty} \frac{1}{\sqrt{a}}\ (\frac{x}{\sqrt{a}} + b)^{n}\ e^{- x^{2}}\ d x = \int_{- \infty}^{+ \infty} f(x)\ e^{- x^{2}}\ d x\ (1) $

Second if You use $H_{2} (x) = 4\ x^{2} - 2$ is $x_{k} = \pm \frac{1}{\sqrt{2}}$ and $A_{k} = \frac{\sqrt{\pi}}{2}$, so that we have... $\displaystyle \int_{- \infty}^{+ \infty} e^{- a\ (\xi-b)^{2}}\ d \xi = \sqrt{\frac{\pi}{a}}\ (2)$

$\displaystyle \int_{- \infty}^{+ \infty} \xi\ e^{- a\ (\xi-b)^{2}}\ d \xi = b\ \sqrt{\frac{\pi}{a}}\ (3)$

$\displaystyle \int_{- \infty}^{+ \infty} \xi^{2}\ e^{- a\ (\xi-b)^{2}}\ d \xi = \sqrt{\frac{\pi}{a}}\ (\frac{1}{2\ a} + b^{2})\ (4)$

$\displaystyle \int_{- \infty}^{+ \infty} \xi^{3}\ e^{- a\ (\xi-b)^{2}}\ d \xi = \sqrt{\frac{\pi}{a}}\ (\frac{3\ b}{2\ a} + b^{3})\ (5)$

Now if You intend to compute the integral for n=4 or n=5 You must use $H_{3} (x) = 8\ x^{3} - 12\ x$...

Kind regards$\chi$ $\sigma$
 
Ahhh thank you much for going through that. It makes a lot more sense to me now.
 

Similar threads

  • · Replies 19 ·
Replies
19
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 27 ·
Replies
27
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K