# Integral of error function times Gaussian

By manipulating equation 4.3.13 from A table of integrals of the error functions, it is possible to derive the following result: $$\int_{-\infty}^{+\infty} e^{-(ax+b)^2}\text{erf}(cx+d)dx = \frac{\sqrt\pi}{a}\text{erf}\left(\frac{ad-bc}{\sqrt{a^2 + c^2}}\right) \quad \quad a,b,c,d \in \mathbb{C}$$ I need to consider the case $$c = ia$$, but according to the above, the denominator becomes zero. In order to gain better understanding of the problem, I am trying solve the indefinite integral, but had no luck so far $$\int e^{-(ax+b)^2}\text{erf}(cx+d)dx = \; ?$$ My goal is to ultimately solve: $$c_0 \int_{-\infty}^{+\infty} e^{-(ax+b)^2}\int_0^x e^{-(iaz+d)^2}dzdx = \; ? \quad \quad c_0: \text{some constant}$$ My question: could somebody please help concerning either question mark?

Thank you very much in advance.

## 1 Answer

I have asked this question because my intention was to calculate the Fourier transform: $$$$\int_{-\infty}^{+\infty} e^{-\alpha^2t^2+\beta t} \text{erf}\left(i\alpha t + \mu \right) e^{-i\omega t}dt = \mathcal{F}\left\lbrace e^{-\alpha^2t^2+\beta t} \big(\text{erf}\left(i\alpha t + \mu\right) \right\rbrace \triangleq I(\omega)$$$$ Maybe I have found something that can be of use to someone.

Consider the Faddeeva function (also known as Kramp function, complex error function, plasma dispersion function): $$$$w(z) \triangleq e^{-z^2}\left(1+\frac{2i}{\sqrt\pi}\int_{0}^{z}e^{u^2}du\right) \equiv e^{-z^2}\left(1+\text{erf}(iz)\right) \\$$$$

Its integral representation is equal to the convolution of a Gaussian with a simple pole, i.e. to the Hilbert transform of a Gaussian: $$$$w(z) = \frac{i}{\pi}\int_{-\infty}^{+\infty}\frac{e^{-u^2}}{z-u}du = e^{-z^2} * \frac{i}{\pi z} = i\mathcal{H}\left\lbrace e^{-\alpha^2z^2}\right\rbrace\quad \quad \Im z >0 \\$$$$ This observation simplifies the calculation of its Fourier transform: \begin{aligned} \mathcal{F}\left\lbrace e^{-\alpha^2t^2}\text{erf}(i\alpha t) \right\rbrace &= \mathcal{F}\left\lbrace w(\alpha t)-e^{-\alpha^2t^2}\right\rbrace \\ &=\mathcal{F}\left\lbrace e^{-\alpha^2t^2} * \frac{i}{\pi t}-e^{-\alpha^2t^2}\right\rbrace \\ &=\mathcal{F}\left\lbrace e^{-\alpha^2t^2}\right\rbrace \mathcal{F}\left\lbrace \frac{i}{\pi t}\right\rbrace-\mathcal{F}\left\lbrace e^{-\alpha^2t^2}\right\rbrace \\ &=\frac{\sqrt\pi}{\alpha}\exp\left(\frac{i\omega}{2\alpha}\right)^2\big(\text{sgn}(\omega)-1\big) %&=\frac{\sqrt\pi}{\alpha}e^{\left(\frac{i\omega}{2\alpha}\right)^2}\left(\text{sgn}(\omega)-1\right) \end{aligned} The Fourier transform $$\mathcal{F}\left\lbrace\frac{i}{\pi t}\right\rbrace = \text{sgn}(\omega)$$ is obtained by taking the Cauchy principal value of the integral.

Now we can rearrange the integrand of $$I(\omega)$$ in order to isolate a $$e^{-\alpha^2t^2}\text{erf}(i\alpha t)$$ term. By defining the variable change $$t' \triangleq t + \frac{\mu}{i\alpha}$$ we obtain: \begin{aligned} I(\omega) &= \int_{-\infty}^{+\infty} e^{-\alpha^2t^2+\beta t} \text{erf}\left(i\alpha t + \mu \right) e^{-i\omega t}dt \\ &=\int_{-\infty}^{+\infty} e^{-\alpha^2\left(t'-\frac{\mu}{i\alpha}\right)^2+(\beta-i\omega)\left(t'-\frac{\mu}{i\alpha}\right)} \text{erf}\left(i\alpha t'\right) dt'\\ %&=\int_{-\infty}^{+\infty} e^{-\alpha^2 t'^2-2i\alpha\mu_qt'+ \mu^2+a_0t'-\beta\frac{\mu_q}{i\alpha}-i\omega t'+i\omega \frac{\mu_q}{i\alpha}+\mu^2} \text{erf}\left(i\alpha t'\right) dt'\\ %&=\int_{-\infty}^{+\infty} e^{-\alpha^2 t'^2+s_qt'+(i\omega-a_0) \frac{\mu}{i\alpha}+\mu_q^2} \text{erf}\left(i\alpha t'\right) e^{-i\omega t'} dt'\\ &= e^{\mu^2+\frac{\mu}{i\alpha}(i\omega-\beta)} \mathcal{F}\left\lbrace e^{(\beta - 2i\alpha\mu)t'}e^{-\alpha^2t'^2}\text{erf}(i\alpha t')\right\rbrace\\ &= \frac{\sqrt\pi}{\alpha}e^{\left(\frac{i\omega-\beta}{2\alpha}\right)^2} \big(\text{sgn}(i\omega-\beta+2i\alpha\mu)-1\big) \end{aligned}