1

What would be the proper way to integrate the expression:

$\int^{\infty}_{-\infty}e^{-\alpha x^{2}}\frac{P(x)}{Q(x)}dx$

If everything is fine, i.e. $\alpha$ is positive, polynomial $Q(x)$ has no real zeroes and the order of $P(x)$ is less than the order of $Q(x)$?

In particular:

$P(x)=1+x$

$Q(x)=(1+(x-a)^2)^s$

$s>0$ is integer, $a$ is real.

Vsevolod A.
  • 163
  • 1
  • 7
  • 1
    The answer would probably be, replace x by z and do contour integration. Use residue theorem. This is actually harder than i have excpected. See here https://math.stackexchange.com/q/34767/640364 – eyal karni Aug 05 '19 at 01:36
  • 1
    @eyalkarni by simply following the procedure as if no exponent was in place I'm getting the wrong result. – Vsevolod A. Aug 05 '19 at 02:13
  • 1
    @eyalkarni the problem is $e^{-z^2}$ becomes infinitely large when $z$ goes into any complex infinity, so you can't disregard the distant parts of the contour. – Vsevolod A. Aug 05 '19 at 03:25
  • https://math.stackexchange.com/q/1585707/515527 – Zacky Aug 05 '19 at 03:44
  • @ㄴㄱ I added the particular $P$ and $Q$, they look very different from the ones in that link. – Vsevolod A. Aug 05 '19 at 05:08
  • I tried something with the series, but it gets too complicated. My advice: use numerical quadrature. In this case Gauss-Hermite quadrature should do the trick – Yuriy S Aug 05 '19 at 09:10
  • 1
    This seems to be helpful https://www.jstor.org/stable/2588989?seq=1#page_scan_tab_contents – eyal karni Aug 05 '19 at 10:42

1 Answers1

2

Let's try using substitution to get the integral into some recognizable form.

$$x=y+a$$

$$I_s(\alpha,a)= e^{- \alpha a^2} \int_{-\infty}^\infty e^{- \alpha y^2} e^{- 2\alpha a y} \frac{1+y+a}{(1+y^2)^s} dy$$

Clearly, we can consider two separate integrals:

$$J_s(\alpha,a)=\int_{-\infty}^\infty e^{- \alpha y^2} \frac{e^{- 2\alpha a y}}{(1+y^2)^s} dy$$

$$Y_s(\alpha,a)=\int_{-\infty}^\infty e^{- \alpha y^2} \frac{e^{- 2\alpha a y} y}{(1+y^2)^s} dy$$

1) Let's start with the first one. Expand the exponential as a series:

$$J_s(\alpha,a)=\sum_{n=0}^\infty \frac{(-1)^n (2 \alpha a)^n}{n!} \int_{-\infty}^\infty e^{- \alpha y^2} \frac{y^n}{(1+y^2)^s} dy$$

The integrals inside the series will be nonzero only for $n=2m$. Then we can write:

$$2\int_0^\infty e^{- \alpha y^2} \frac{y^{2m}}{(1+y^2)^s} dy=\int_0^\infty e^{- \alpha z} \frac{z^{m-1/2}}{(1+z)^s} dz=\Gamma\left(m+\frac12 \right) \mathrm U \left(m+\frac12,m-s+\frac32,\alpha \right)$$

Where $\mathrm U$ is the Tricomi hypergeometric function.

Let's not forget:

$$\Gamma\left(m+\frac12 \right)= 2 \sqrt{\pi} \frac{\Gamma(2m)}{\Gamma(m) 4^m}$$

Simplifying, we obtain:

$$J_s(\alpha,a)=\sqrt{\pi} \sum_{m=0}^\infty \frac{(\alpha a)^{2m}}{m!} \mathrm U \left(m+\frac12,m-s+\frac32,\alpha \right)$$

2) Doing the same series expansion for the second integral:

$$Y_s(\alpha,a)=\sum_{n=0}^\infty \frac{(-1)^n (2 \alpha a)^n}{n!} \int_{-\infty}^\infty e^{- \alpha y^2} \frac{y^{n+1}}{(1+y^2)^s} dy$$

Now we have to take $n=2m+1$, which gives us:

$$2 \int_0^\infty e^{- \alpha y^2} \frac{y^{2m+2}}{(1+y^2)^s} dy=\int_0^\infty e^{- \alpha z} \frac{z^{m+1/2}}{(1+z)^s} dz=\Gamma\left(m+\frac32 \right) \mathrm U \left(m+\frac32,m-s+\frac52,\alpha \right)$$

After simplifications:

$$Y_s(\alpha,a)=-\sqrt{\pi} \sum_{m=0}^\infty \frac{(\alpha a)^{2m+1}}{m!} \mathrm U \left(m+\frac32,m-s+\frac52,\alpha \right)$$

Finally we obtain:

$$I_s(\alpha,a)= \\ = \sqrt{\pi} e^{- \alpha a^2} \sum_{m=0}^\infty \frac{(\alpha a)^{2m}}{m!} \left((1+a) \mathrm U \left(m+\frac12,m-s+\frac32,\alpha \right)- \\ - \alpha a \mathrm U \left(m+\frac32,m-s+\frac52,\alpha \right) \right)$$

Note that the series should converge for all reasonable parameters, including $\alpha a>1$. Numerical experiments confirm that the series and the integral are equal.

The Tricomi function in Wolfram language is HypergeometricU[a,b,z].

As an example, let's take $\alpha=3$, $a=2$, $s=1/2$:

NIntegrate[Exp[12-3 x^2] (1+x)/(1+(x-2)^2)^(1/2)/Sqrt[Pi],{x,-Infinity,Infinity},WorkingPrecision->20]

gives 45951.232606275117969.

Sum[36^m/m! (3 HypergeometricU[m+1/2,m+1,3]-6 HypergeometricU[m+3/2,m+2,3]),{m,0,50}]

gives 45951.232606275096333.

The accuracy is good.

Obviously, this is not very useful for actual integral evaluation, because we use special functions, but this is all I managed to do.

Yuriy S
  • 31,474