How should $\int_0^\infty e^{-(x+ci)^2}dx$ be evaluated, where $c$ is a real constant.
Attempt: I know that $\int_0^\infty e^{-x^2}dx = \sqrt{\pi}/2$ and from the context where the question is asked I suspect that $\sqrt{\pi}/2$ might be the answer here as well.
One idea was to substitute $u=x-ci$ in which case we end up with $\int_{-ci}^{\infty-ci} e^{-u^2}du$ but I was not sure how proceed. Another thought is that we are evaluating over the same length on the real axis and adding $ci$ just shifts the argument and this should here not influence the value of the integral but was not sure how to make progress.
Let $I_R$ be the integral given by
$$I_R=\int_0^R e^{-(x+ic)^2}\,dx$$
where $c\in \mathbb{R}$. Noting that the function $e^{-z^2}$ is entire, we can apply Cauchy's integral theorem and write
$$I_R=\int_c^0 e^{y^2}\,i\,dy+\int_0^R e^{-x^2}\,dx+\int_0^c e^{-(R+iy)^2}\,i\,dy$$
Taking the limit as $R\to \infty$ reveals
$$\int_0^\infty e^{-(x+ic)^2}\,dx=\frac{\sqrt\pi}{2}-i\frac{\sqrt\pi}{2}\text{efci}(c)$$
where $\text{erfi}(x)$ is the imaginary error function.