WWCY said:
I'm not sure I follow what you're trying to say here. If I leave the integral as it is, how do I evaluate it analytically without use of the erf?
Does this mean that erf is able to take and produce complex values (i.e. ##\text{erf} (x + iy)##)?
If so, is there a way to write a complex erf in real and imaginary parts? I ask as I'm interested in calculating the absolute value of the complex erf (or the original integral to be exact).
Thank you for your patience and assistance.
Yes. you can compute ##\text{erf}(x+iy)##. One way would be to use the series given in the link I provided. Most computer algegra systems (such as Mathematica or Maple---the one I use) can do it easily. For example, here is a screen shot of what I get using Maple (which uses I for ##\sqrt{-1}##):
r:=erf(2+3*I); <---input
r := erf(2 + 3 I) <-- echoed output
> evalf(r); <-- input --- means "floating-point evaluation
-20.82946143 + 8.687318271 I <---- output at standard default accuracy
> evalf[50](r);
-20.829461427614568389103088451981112874439035666354 +
8.6873182714701631444280787545418715530519896486487 I <----- 50 digit accuracy
Anyway, the
definition of an improper integral such as yours is
$$\int_{-\infty}^0 f(p) \, dp = \lim_{N \to \infty} \int_{-N}^0 f(p) \, dp.$$
So, I ask again: how do you know if a limit exists? Certainly the integral is expressible in terms of "erf" for finite ##N##, but it will involve ##\text{erf}(c-iN)##, so an argument having a large imaginary part. Does that have a finite limit? Can you say for sure that the answer does not have the form ##\pm \infty \pm i \infty?##