How to obtain a close form/fast expression for this integral?

124 Views Asked by At

I have the following integral:

$$ I_p = \int_0^1 x^{p-1}(ax + b) e ^{-(ax + b)^2/N}dx$$

where

$$ \{x,a,b\} \in (-\infty,\infty), \; N \in (0,\infty), \; p \in \mathbb Z, p \geq 1 . $$

I want to find a stable formula for computation of $J_p$.

(a) I am able to obtain a recursion using the integration by parts formula between $J_p, J_{p-1}$ and $J_{p-2}$, but there is $a$ in the denominator which can take small values close to zero and hence the recursion blows up.

(b) I do not want to do it numerically as it is not as efficient.

I want to know if this integral can be expression as some function which can be computed efficiently?

1) Recursion:

Now, $$I_p = a J_p + b J_{p-1}$$

such that

$$ J_p = \int_0^1 x^{p} e ^{-(ax + b)^2/N}dx$$

And we can get a recursion on the above integral as:

$$J_{p+1} = \frac{Np}{2a^2} J_{p-1} - \frac{b}{a} J_p - \frac{N}{2a^2} e^{-(a+b)^2/N}$$

I have the closed form expressions for $J_0$ and $J_1$ in terms of erf or normal cdf. The problem is that $a$ and its powers are in denominator, causing recursion to be unstable.

2

There are 2 best solutions below

2
On

If $J_{p+1} = \frac{Np}{2a^2} J_{p-1} - \frac{b}{a} J_p - \frac{N}{2a^2} e^{-(a+b)^2/N} $, then multuplying by $a^{p+1}$, $a^{p+1}J_{p+1} = \frac{Np}{2} a^{p-1}J_{p-1} - a^p J_p - \frac{N}{2}a^{p-1} e^{-(a+b)^2/N} $.

If we let $K_p = a^p J_p $, this becomes $K_{p+1} = \frac{Np}{2} K_{p-1} - K_p - \frac{N}{2}a^{p-1} e^{-(a+b)^2/N} $.

This looks like it might be more stable.

1
On

Hint:

$\int_0^1x^{p-1}(ax+b)e^{-\frac{(ax+b)^2}{N}}~dx$

$=\int_\frac{b}{a}^{\frac{b}{a}+1}ax\left(x-\dfrac{b}{a}\right)^{p-1}e^{-\frac{a^2x^2}{N}}~dx$

$=\int_\frac{b}{a}^{\frac{b}{a}+1}\sum\limits_{n=1}^p\dfrac{C_{n-1}^{p-1}(-1)^{p-n}b^{p-n}x^ne^{-\frac{a^2x^2}{N}}}{a^{p-n-1}}~dx$

$=\int_\frac{b}{a}^{\frac{b}{a}+1}\sum\limits_{n=1}^p\dfrac{(-1)^{p-n}(p-1)!b^{p-n}x^ne^{-\frac{a^2x^2}{N}}}{(n-1)!(p-n)!a^{p-n-1}}~dx$