Gaussian function integration - Application to statistical mechanics I am struggling solving a integral. I am making a slight mistake but do not know where... Could you help me solve my problem please :)?
$$ \int_{-\infty}^{+\infty} N^2 e ^{-\frac{\beta\gamma}{2}(N-N^{*})^2} dN $$
Where $ \beta, \gamma, N^{*}$ are constants.
When doing the integration, I am finding $ \frac{1}{\beta \gamma} \times \sqrt{\frac{2\pi}{\beta \gamma}}$. But I am pretty sure that I should also have something with a $N^*$.
Thanks for your help and sorry for the dummy question !
Léonard
Note : Obviously, to solve the integral one should use 
$$\int_{-\infty}^{+\infty} x^n e^{-\alpha x^2} dx = \frac{n-1}{2\alpha} \int_{-\infty}^{+\infty} x^{n-2} e^{- \alpha x^2} dx$$
and 
$$\int_{-\infty}^{+\infty} e^{-\alpha x^2} dx = \sqrt{\frac{\pi}{\alpha}}$$
 A: Hint:
You can shift the variable by $N:=M+N^*$ so that you get three terms in $M^2,2MN^*$ and $N^{*2}$. The second term will vanish by symmetry and you'll end up with
$$a+bN^{*2}.$$
A: So I just find the answer! Yves is right :)
By shifting the variable, you find the solution easily !
$$ \int_{-\infty}^{+\infty} N^2 e ^{-\frac{\beta\gamma}{2}(N-N^{*})^2} dN $$
By doing $ X = N - N^{*}$ (thus $N = X + N^{*}$ and $ dX = dN + dN^{*} = dN$ , $N^{*}$ being a constant).
We now have  
$$ \int_{-\infty}^{+\infty} (X+N^{*})^2 e ^{-\frac{\beta\gamma}{2}X^2} dX $$
$$ \int_{-\infty}^{+\infty} X^2 e ^{-\frac{\beta\gamma}{2}X^2} dX + 
2 N^{*}\int_{-\infty}^{+\infty} X e ^{-\frac{\beta\gamma}{2}X^2} dX + \int_{-\infty}^{+\infty} N^{*2} e ^{-\frac{\beta\gamma}{2}X^2} dX $$
Solving those integrals individually, one gets


*

*For the first one


$$ \int_{-\infty}^{+\infty} X^2 e ^{-\frac{\beta\gamma}{2}X^2} dX = \frac{1}{\beta \gamma} \times \int_{-\infty}^{+\infty} e ^{-\frac{\beta\gamma}{2}X^2} dX = \frac{1}{\beta \gamma} * \sqrt{\frac{2 \pi}{\beta \gamma}}  $$


*

*For the second one 


$$ 2 N^{*}\int_{-\infty}^{+\infty} X e ^{-\frac{\beta\gamma}{2}X^2} dX = 0 $$ 
For parity reason, the integral is equal to zero (the integral is odd on $ ] - \infty ; + \infty [ $, thus is equal to zero when integrating on this ensemble)


*

*For the last one 


$$ \int_{-\infty}^{+\infty} N^{*2} e ^{-\frac{\beta\gamma}{2}X^2} dX = N^{*2}  \int_{-\infty}^{+\infty} e ^{-\frac{\beta\gamma}{2}X^2} dX = N^{*2} \times \sqrt{\frac{2 \pi}{ \beta \gamma}} $$
In conclusion,
$$ \int_{-\infty}^{+\infty} N^2 e ^{-\frac{\beta\gamma}{2}(N-N^{*})^2} dN = \sqrt{\frac{2 \pi}{\beta \gamma}} \times (N^{*2} + \frac{1}{\beta \gamma}) $$
