Is there a formula for this gaussian integral

Click For Summary
The discussion centers on finding a formula for the Gaussian integral $$\int_{-\infty}^{\infty}{x^4}{e^{-a(x-b)^2}}dx$$, which is not readily available in standard references. Participants note that the integral can be related to the moments of the normal distribution, with established formulas for even moments. The correct result for the fourth moment is derived as $$\frac{3\sqrt{\pi}}{4 a^{5/2}}$$, confirming the relationship between the parameters a and b. Additionally, integration techniques and the use of characteristic functions are suggested as methods to derive such integrals. The conversation highlights the importance of understanding both central and non-central moments in solving these types of problems.
skate_nerd
Messages
174
Reaction score
0
Is there a formula for this gaussian integral:

$$int_{-\infty}^{\infty}{x^4}{e^{-a(x-b)^2}}dx$$

I've tried wikipedia and they only have formulas for the integrand with only x*e^... not x^4e^...
Wolframalpha won't do it either, because I actually have an integral that looks just like that, unknown constants and all.
 
Physics news on Phys.org
Well, we know that:

$$\int_{-\infty}^\infty e^{-bx^2}dx=\sqrt{\frac{\pi}{b}}$$

Taking some derivatives:

$$\frac{d^2}{db^2}\int_{-\infty}^\infty e^{-bx^2}dx=\int_{-\infty}^{\infty}x^4e^{-bx^2}dx=\frac{3}{4}\frac{\sqrt{\pi}}{b^{5/2}}$$

I'm not sure if you can use this for your integral, but it looks possible.
 
Sorry, but you can't :/
 
Matterwave's answer is correct!
 
skate_nerd said:
Is there a formula for this gaussian integral:

$$int_{-\infty}^{\infty}{x^4}{e^{-a(x-b)^2}}dx$$

You are basically just asking for the moments of the normal distribution. These are well known:
\int_{-\infty}^{\infty} \frac{x^p}{\sigma \sqrt{2\pi}} e^{-(x-\mu)^2 / (2 \sigma^2)} dx= \sigma^p (p-1)!
when p is even, and zero when p is odd.

So ##p=4##, ##\sigma = \frac{1}{\sqrt{2a}}## and ##\mu = b##, which gives ##\frac{3\sqrt{\pi}}{4 a^{5/2}}## as Matterwave gave.
 
  • Like
Likes 1 person
I'm sorry i just don't think that's correct. Try wolframalpha. I know the formulas for the x, x^2, x^3 cases, but not the x^4. But everything up to x^3 agrees with wolframalpha's output, and this formula you guys are giving doesn't look very similar and does not agree.
$$\int_{-\infty}^{\infty}{x}e^{-a(x-b)^2}dx=b\sqrt{\frac{\pi}{a}}$$
$$\int_{-\infty}^{\infty}{x^2}e^{-a(x-b)^2}dx=(\frac{1}{2a}+b^2)\sqrt{\frac{\pi}{a}}$$
$$\int_{-\infty}^{\infty}{x^3}e^{-a(x-b)^2}dx=(\frac{3b}{2a}+b^3)\sqrt{\frac{\pi}{a}}$$
There's a pattern here but I can't figure it out.
 
skate_nerd said:
I'm sorry i just don't think that's correct.

I'm an idiot, I looked up the central moments (and even that's wrong because it should be ##(p-1)!##). The non-central moments are

##\mu##
##\mu^2+\sigma^2##
##\mu^3+3\mu\sigma^2##
##\mu^4+6\mu^2\sigma^2+3\sigma^4##,
for p = 1, 2, 3, and 4. Those should agree with what you have.
 
  • Like
Likes 1 person
Ahhh thank you thank you thank you! That works 100%! Man I've been trying to get this formula for a week...I really appreciate it.
 
The "freshman calculus" way to do this is to integrate by parts:
u = x^3 \qquad dv = xe^{-x^2}\,dxso that
du = 3x^2 \qquad v = -{1 \over 2}e^{-x^2}and now the degree of the polynomial has been reduced by 2.

Now, that is for the case where a and b are 0, but the other cases are really the same. You just have to change variables; then you will have a more complicated polynomial in place of x^4, but once you know how to do \int x^{2k}e^{-x^2} you can integrate any polynomial times e^{-x^2}.
 
  • #10
Another clever way to do this integral is to look at the characteristic function for a Gaussian distribution:

$$C(t)\equiv\left<e^{itx}\right>=\frac{1}{\sigma\sqrt{2\pi}} \int_{-\infty}^{\infty}e^{itx}e^{-(x-\mu)^2/2\sigma^2}$$

You can do this integral by completing the square in the exponential, or by just looking it up. You will find:

$$C(t)=e^{it\mu-\frac{1}{2}t^2\sigma^2}$$

You can expand this function in powers of t, and match it to the expansion of:

$$\left<e^{itx}\right>\approx 1+\left<itx\right>+\frac{\left<(itx)^2\right>}{2}+...$$

If you match the powers of t on both sides, you can get all the general moments of the Gaussian distribution. You can get all the odd ones too, for which the formula I gave earlier would no longer work. This Characteristic function is closely related to the moment generating function, but I'm more familiar with working with these.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 31 ·
2
Replies
31
Views
4K
  • · Replies 19 ·
Replies
19
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
5
Views
3K
Replies
1
Views
2K