Integrale gaussiano indefinito e metodo risolutivo per l'integrale gaussiano classico

ghe-sboro1234567
"""Articolo""" scritto da me; se qualcuno notasse degli errori, lo prego di farlo presente :) (È tutto in inglese)

What this article does is to give an easier, and more elegant solution not only for the indefinite gaussian integral, but also to the gaussian integral itself, in all its variants.

Indefinite gaussian integral

$$ \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)}dx\biggl] $$ Where the integral is calculated as follows: $$ \int \frac{x^{n+2}}{e^{x^2}(n+1)} = \frac{1}{n+1} \int x^{n+2}e^{-x^2}dx \to n+2=u, n+1=u-1 $$ $$ \frac{1}{u-1}\int x^ue^{-x^2}dx \to x^2=k, x=\sqrt{k}, dt=\frac{1}{2\sqrt{k}}dk $$ $$ \frac{1}{2(u-1)}\int k^{u/2}e^{-k}k^{-1/2}dk = \frac{1}{2(u-1)}\int k^{\frac{u-1}{2}}e^{-k}dk = \frac{1}{2(n+1)}\int k^{\frac{n+1}{2}}e^{-k}dk = I $$ $$ \to -\Gamma\biggl(\frac{n+3}{2},k\biggl) = \int_{k}^{\infty} t^{\frac{n+3}{2}-1}e^{-t}dt = \int_{k}^{\infty} t^{\frac{n+1}{2}}e^{-t}dt \to I = -\frac{1}{2(n+1)}\Gamma\biggl(\frac{n+3}{2},x^2\biggl)$$
$$ \to a\int x^ne^{-x^2}dx = a\biggl[\frac{x^{n+1}}{e^{x^2}(n+1)} - \frac{1}{(n+1)}\Gamma\biggl(\frac{n+3}{2},x^2\biggl)\biggl] + C $$ For a=1 and n=0 we get:


$$\frac{x}{e^{x^2}} - \Gamma\biggl(\frac{3}{2},x^2\biggl) + C =\int e^{-x^2}dx $$

Applications with the gaussian integral and its variants

$$ = \int_{-\infty}^{+\infty} e^{-x^2}dx = 2\biggl(\int_{0}^{+\infty} e^{-x^2}dx\biggl) = $$ $$\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\bigl(3/2,x^2)\biggl) =
\Gamma\biggl(\frac{3}{2}, 0\biggl) = $$ $$= \int_{0}^{\infty}t^{1/2}e^{-t}dt \to \Gamma\biggl(\frac{1}{2}+1\biggl) \to \Gamma(1/2+n)=\frac{(2n)!}{4^nn!}\sqrt{\pi} = \frac{2}{4}\sqrt{\pi}=\frac{\sqrt{\pi}}{2} = \Gamma\biggl(\frac{3}{2}\biggl) $$
$$ \to 2\biggl(\int_{0}^{+\infty} e^{-x^2}dx\biggl)= 2\biggl(\frac{\sqrt{\pi}}{2}\biggl) = \sqrt{\pi} $$
We notice that the term $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_{a}^{b} e^{-x^2}dx = 2\biggl[\Gamma(3/2,x^2)\biggl]_{a}^{b} \hspace{0.2cm} \forall a = 0 , b = \infty \lor a = -\infty , b = 0 \hspace{0.8cm} (1)$$ since this particular function is even. Obviously the upper and lower bounds can be whatever we want; let's say we want to calculate the integral from 0 to 1, then we get: $$ \int_{0}^{1} e^{-x^2}dx = \frac{1}{e^{1^2}}-\Gamma(3/2, 1)+\Gamma(3/2,0) = 1/e + \sqrt{\pi}/2-\Gamma(3/2,1) \approx 0.746 $$ Or, another example: $$ \int_0^{\infty} xe^{-x^2}dx $$ so we have a case where a=1 and also n=1. $$ \int_0^{\infty} xe^{-x^2}dx = \biggl[\frac{x^{2}}{2e^{x^2}} - \frac{1}{2}\Gamma\biggl(2,x^2\biggl)\biggl]_0^{\infty} = $$ By using (1): $$ \int_0^{\infty} xe^{-x^2}dx = \frac{1}{2}\Gamma(2,0)=\frac{1}{2} $$ Which is exactly what we were expecting.

Risposte
Mephlip
Ciao Don Mastro, benvenuto sul forum!

Un primo errore che vedo è qui:
"Don Mastro":
\[x^2=k, x=\sqrt{k}\]

Non hai informazioni sul segno di $x$, quindi da $x^2=k$ segue $|x|=\sqrt{k}$. Dopo consideri l'intervallo $\mathbb{R}$ e ti riduci a $[0,+\infty[$ per parità, quindi il problema non emerge; ma, nel caso dell'integrale indefinito, non puoi fare questa assunzione (a meno di specificare a priori che $x \ge 0$).

Inoltre, qui:
"Don Mastro":

$$\int_{-\infty}^{+\infty} e^{-x^2}dx = 2\biggl(\int_{0}^{+\infty} e^{-x^2}dx\biggl) = \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\bigl(3/2,x^2)\biggl)$$

Perché calcoli il limite per $x \to 0$? L'integrale non è improprio in un intorno destro di $0$, ma solamente in un intorno di $+\infty$.

Comunque, che intendi con "soluzione più semplice e più elegante"? Considerata l'importanza della funzione $\Gamma$, temo che le relazioni da te trovate siano note da tempo. Ad esempio, qui.

Infine, l'integrale:
$$\int_0^{+\infty} xe^{-x^2}\text{d}x$$
Non necessita l'uso di strumenti avanzati come la $\Gamma$, visto che posto $x^2=y$ esso si riconduce a:
$$\frac{1}{2} \int_0^{+\infty} e^{-y}\text{d}y=\frac{1}{2}$$
Quindi, ti consiglio di sostituire quell'esempio con uno più significativo rispetto all'argomento che stai trattando.

pilloeffe
Ciao Don Mastro,

Mi associo al benvenuto sul forum di Mephlip e dico anch'io la mia... :wink:
"Don Mastro":

Indefinite gaussian integral

\[ \int ax^ne^{-x^2}dx = a\int x^ne^{-x^2}dx = \]

Questo in realtà non ha molto senso, perché $a$ è una costante, quindi è chiaro che si porta fuori dall'integrale... :wink:
Più interessante, e forse era proprio di questo che intendevi trattare, sarebbe stato l'integrale seguente:

$ \int x^n e^{- ax^2} \text{d}x $

"Don Mastro":
Applications with the gaussian integral and its variants

Per questi integrali i risultati sono ben noti da tempo, avevo scritto anche un post al riguardo in questo thread.

Rispondi
Per rispondere a questa discussione devi prima effettuare il login.