Generic integral for n-th order gaussian

454 Views Asked by At

I'm working with super-gaussian profiles of the form:

$$ f(x) = A\exp\bigg({-\big(\frac{(x-x_0)^2}{2\sigma^2}\big)}^n\bigg) $$

I need to integrate this function for various $n$ values (probably between 4-30), and was wondering if there's a more modular way to do this that applies to all $n$, rather than having to derive an integral for every value of $n$ that I choose?

Edit: The limits of integration are finite (between -0.3 and 0.3 for all $n$)

2

There are 2 best solutions below

0
On

Using centered-reduced coordinates, the integration limits are arbitrary and

$$\int_a^b e^{-u^{2n}}du=\frac1{2n}\int_a^b t^{-1+1/2n}e^{-t}dt$$

which is an incomplete Gamma integral.

2
On

$$I_n=\int\exp\left({-\left(\frac{(x-x_0)^2}{2 \sigma ^2}\right)^n}\right)\,dx=\frac{\sigma }{\sqrt{2}}\int \frac{e^{-t^n}}{\sqrt{t}}\,dt=-\frac{\sigma }{\sqrt{2} n}\Gamma \left(\frac{1}{2 n},t^n\right)$$

Edit

Using $x_0=0$ and $\sigma=1$ the integral between $0$ and $\infty$ is given by $$S_\infty=\sqrt{2}\,\, \Gamma \left(1+\frac{1}{2 n}\right)$$ while the integral between $0$ and $a$ is given by $$S_a=\frac{\Gamma \left(\frac{1}{2 n}\right)-\Gamma \left(\frac{1}{2 n},2^{-n} a^{2n}\right)}{\sqrt{2} n}$$ So, if you desire $$\frac{S_a}{S_\infty}=k$$ for a given $n$ you need to solve for $a$ the equation $$\Gamma \left(\frac{1}{2 n},2^{-n} a^{2 n}\right)=\Gamma \left(\frac{1}{2 n}\right)-2\,k \,n\, \Gamma \left(1+\frac{1}{2 n}\right)$$ and this will require some numerical method such as Newton. This does not make much problems.

Doing it for $k=0.99$, some results $$\left( \begin{array}{cc} n & a_n \\ 1 & 2.57583 \\ 2 & 1.76640 \\ 3 & 1.59095 \\ 4 & 1.51900 \\ 5 & 1.48120 \\ 6 & 1.45847 \\ 7 & 1.44360 \\ 8 & 1.43327 \\ 9 & 1.42578 \\ 10 & 1.42017 \\ 11 & 1.41585 \\ 12 & 1.41246 \\ 13 & 1.40975 \\ 14 & 1.40756 \\ 15 & 1.40576 \\ 16 & 1.40427 \\ 17 & 1.40303 \\ 18 & 1.40198 \\ 19 & 1.40109 \\ 20 & 1.40033 \end{array} \right)$$