Determine Gaussian integral without using erf(z)

307 Views Asked by At

How can I compute the well-known integral, $$ I(t,\mu,\sigma) = \frac{1}{\sqrt{2\pi} \sigma} \int_0^t e^{-\frac{(\tau - \mu)^2}{2\sigma^2}} d\tau$$ without using the $erf(z)$ definition.

I am looking for a non-faster way to obtain $I(t,\mu,\sigma)$, because $erf(z)$ trends to diverge in an iterative process varying $t$. I tried to approximate $I(t,\mu,\sigma)$ using the Gauss-Legendre quadrature, but results are not accurate enough.

2

There are 2 best solutions below

1
On

The way I did it is to let $z = (\tau - \mu)/\sigma$, then, after the appropriate substitution, you get the well known Gaussian Integral.

3
On

In the Wikipedia article on the error function there is a reference to a numerical solver implemented in the PARI/GP computer algebra system using Tanh-sinh quadrature. The Wikipedia article on this algorithm states: 'Bailey (2006) found that: "The tanh-sinh quadrature scheme is the fastest known high-precision quadrature scheme, especially when the time for computing abscissas and weights is considered. It has been successfully employed for quadrature calculations of up to 20,000-digit precision. It works well for functions with blow-up singularities or infinite derivatives at endpoints."'