Indefinite integral of $e^{-x^2}$

165 Views Asked by At

Ok, so, I was messing around with the famous gaussian integral and tried to generalize it such that $$ \int ax^n\cdot e^{-x^2} dx $$ would equal something. A logic conseguence is that if $a=1$ and $n=0$ you just get the (indefinite) gaussian integral. By doing some calculations i got to this: $$ a\biggl(\frac{x^{n+1}}{e^{x^2}(n+1)}+2(n+1)\int \frac{x^{n+2}}{e^{x^2}} dx\biggl) $$ Which is equal to: $$ a\biggl(\frac{x^{n+1}}{e^{x^2}(n+1)}+2(n+1)\biggl[-\frac{1}{2}\Gamma\biggl(\frac{n+3}{2},x^2\biggl)\biggl] $$ And if we plug in $a=1$ and $n=0$ we get: $$\frac{x}{e^{x^2}}-\Gamma\biggl(\frac{n+3}{2},x^2\biggl) $$ And, by plugging in infinity (limit) and $0$, we get $$ \frac{\sqrt\pi}{2} $$ This isn't quite the gaussian integral, but I can't find any mistakes I did in the calculations, if anyone could help it'd be awesome!

1

There are 1 best solutions below

2
On

I got to this, it should be correct: $$ \int ax^ne^{-x^2}dx = a\int x^ne^{-x^2}dx = $$
By using integration by parts we get:
$$ = a\biggl[\frac{x^{n+1}}{e^{x^2}(n+1)} + 2\int \frac{x^{n+2}}{e^{x^2}(n+1)}\biggl] =$$ $$ a\biggl[\frac{x^{n+1}}{e^{x^2}(n+1)} + 2\biggl(-\frac{x^{n+1}(x^2)^{-n/2-1/2}\Gamma(3+n/2,x^2)}{2(n+1)} +C\biggl)\biggl]$$ For a=1 and n=0 we get: $$\frac{x}{e^{x^2}} + 2\biggl(-\frac{x(x^2)^{-1/2}\Gamma(3/2,x^2)}{2}\biggl) = \frac{x}{e^{x^2}} - \Gamma(3/2,x^2) +C=\int e^{-x^2}dx $$ Returning now to the Gaussian integral itself... $$ = \int_{-\infty}^{+\infty} e^{-x^2}dx = 2\int_{0}^{+\infty} e^{-x^2}dx = $$ $$\lim\limits_{x\to\infty} \biggl(\frac{x}{e^{x^2}} - \Gamma(3/2,x^2)\biggl)-\lim\limits_{x\to 0^+} \biggl(\frac{x}{e^{x^2}} - \Gamma(3/2,x^2)\biggl) = \frac{\sqrt{\pi}}{2} $$ $$ \to 2\biggl(\int_{0}^{+\infty} e^{-x^2}dx\biggl)= 2\biggl(\frac{\sqrt{\pi}}{2}\biggl) = \sqrt{\pi} $$ Also, we notice that the term $\frac{x}{e^{x^2}}$ always goes to zero when we are taking the limit as x tends to 0 or $\pm\infty$. So, for every x that respects these conditions, we can say that: $$ \int_{\beta}^{\eta} e^{-x^2}dx = 2\biggl[\Gamma(3/2,x^2)\biggl]_{\beta}^{\eta} \hspace{0.2cm} \forall \beta = 0 , \eta = \infty $$