Regarding Gaussian integrals, I'm confused about how you combine completing the square and differentiating under the integral sign.

13 Views Asked by At

Sorry if this question has been asked before. I have done some googling but with no luck. I'm not sure how to explain exactly so I'll just write the maths.

Is this statement true?

$$\int_{-\infty}^{\infty} x^2*e^{-(x-b)^2}dx = \frac{\sqrt\pi}{2}$$

Or is this statement true? $$\int_{-\infty}^{\infty} (x-b)^2*e^{-(x-b)^2}dx = \frac{\sqrt\pi}{2}$$

Or are neither? Basically does the index power have to match what the multiplying variable is or not? If that makes sense.

Thanks in advance!