# Integral involving exponential functions: numerical issues

I need to numerically compute this rather involved integral

$I(z) = \int_{0}^{\infty} \phi\Big(\frac{K(z) - \mu(t)}{\sigma(t)} \Big) \big( \frac{1}{\sigma(t)}\big)\exp(-\lambda t)dt$

where $\phi$ is the density of a standard normal random variable,

$\mu(t) = \frac{1}{a}\big[(r_0 - b)(1 - \exp(-at)) + abt \big]$,

$\sigma^2(t) = \frac{c^2}{2a^3}\big[ 2at+4\exp(-at)-\exp(-2at)-3\big]$

$a,b,c,r_0,\lambda$ are real parameters.

Basic quadrature routines (Simpson and the one implemented in the integral Matlab function) raise numerical issues: $I(z)$ is part of a density and when it is integrated over $[-\infty,\infty]$ the error is around 2% (I need it to be much smaller) so it boils down to the accuracy of the estimate of this integral. I wonder if there is a closed form solution or a simpler form more suitable for the implementation (some series expansion?). I tried the substitution ($y = \exp(-\lambda t)$) but the accuracy is still bad. Any advice would be highly appreciated.

• You would attract the interest of more people if you explained the nature of your numerical difficulties. – Carl Christian Dec 6 '17 at 11:56