# Definite integral from $-\infty$ to zero of an exponential function

I'm trying to compute a definite integral from $-\infty$ to zero of an equation of the form $$x^{2n+1} e^{-x^2 /a^2}$$ I have been able to find from a table in my book that the definite integral of the form with which I'm working, from zero to $\infty$ is: $$\int_0^\infty x^{2n+1} e^{-x^2 /a^2} dx = \frac{n!}{2} {a}^{2n+2}$$ but I don't quite know where to go from there. Now that I know the integral from zero to $\infty$, how do I get the integral from $-\infty$ to zero? I know I need to do a variable transformation, but I don't know what exactly I need to do or how.

If the function is odd, then the integral from $-\infty$ to $\infty$ is $0$, and since you know that $$\int_{-\infty}^\infty f(x)dx= \int_{-\infty}^0f(x)dx + \int_0^\infty f(x)dx$$ your problem is no harder.
Consider the integration of $$I_n=\int x^{2n+1} e^{-x^2 /a^2}dx$$ Use integration by parts with $$u=e^{-\frac{x^2}{a^2}}$$ $$dv=x^{2 n+1}$$ $$du=-\frac{2 x e^{-\frac{x^2}{a^2}}}{a^2}$$ $$v=\frac{x^{2 n+2}}{2 n+2}$$ So,$$\int x^{2n+1} e^{-x^2 /a^2}dx=\frac{e^{-\frac{x^2}{a^2}} x^{2 n+2}}{2 n+2}+\int\frac{ e^{-\frac{x^2}{a^2}} x^{2 n+3}}{a^2 ( n+1)}dx$$ Using bounds you have been given, the first term disappears and the remaining integral is $$\frac{1}{a^2 (n+1)}\int x^{2n+3} e^{-x^2 /a^2}dx=\frac{1}{a^2 (n+1)}I_{n+1}$$ So, now, we have $$I_{n+1}=a^2 ( n+1)I_n$$ from which the formula you found can easily be established since, between the given bounds, $I_0=\frac{a^2}{2}$.