I am considering the approximation of the following integral:
$$\int_{-W/2}^{W/2}\exp[-p( x + iq)^2 ] dx \approx \int_{-\infty}^{\infty}\exp[-p( x + iq)^2 ] dx = \sqrt{\frac{\pi}{p}}$$
For large enough W.....
I was hoping someone could help me figure out around how large W should be in relation to p and q - I'm really struggling to deduce whether p or q is more important etc... any ideas are more than welcome.
By using Cauchy's theorem, we may re-express the integral as
$$\int_{-W/2}^{W/2} dx \, e^{-p (x+i q)^2} = \int_{-W/2}^{W/2} dx \, e^{-p x^2} + 2 e^{-p W^2/4} \int_0^q dy \, e^{p y^2} \sin{(p W y)} $$
The first integral on the RHS behaves as, for large $W$,
$$\sqrt{\frac{\pi}{p}} \operatorname{erf}{\left ( \frac12 W \sqrt{p} \right )} = \sqrt{\frac{\pi}{p}} \left [1-\frac{2}{\sqrt{\pi}} e^{-p^2 W^2/4} \left (\frac1{p W} + O \left (\frac1{W^3} \right ) \right ) \right ]$$
We may derive an asymptotic approximation to the second integral by integrating by parts:
$$\int_0^q dy \, e^{p y^2} \sin{(p W y)} = \left ( 1+ e^{p q^2} \cos{(p q W)}\right ) \frac1{p W} + \frac{2 q}{p} e^{p q^2} \sin{(p q W)} \frac1{W^2} + O \left (\frac1{W^3} \right )$$
You can put these two pieces together to determine how big an error there is for various values of $p$, $q$, and $W$.