# Laplace transform of error function

I am revising Integral Transforms, and trying to find the Laplace Transform of the error function.

I have that $$erf(x)=\frac{2}{\sqrt \pi}\int_0^xexp(-t^2) dt$$

Thus I know the the Laplace transform will be the integral. $$\frac{2}{\sqrt \pi}\int_0^{\infty}e^{-{px}}\int_0^xexp(-t^2) dtdx$$

I was thinking of using integration by parts to solve this, integrating the $$e^{-px}$$ part of the equation, and differentiating the error function part? But I can't seem to get to the right answer doing this, which I know to be $$\frac{1}{p}exp(\frac{p^2}{4})(1-erf(\frac{p}{2})$$

Change the order of integration:$$\frac{2}{\sqrt\pi}\int_0^{\infty}\int_0^xe^{-{px}}e^{-t^2}~dt~dx=\frac{2}{\sqrt\pi}\int_0^{\infty}e^{-t^2}\int_t^\infty e^{-{px}}~dx~dt\\=\frac{2}{p\sqrt\pi}\int_0^{\infty}e^{-(pt+t^2)}dt=\frac{2e^{\frac{p^2}4}}{p\sqrt\pi}\int_0^{\infty}e^{-\left(t+\frac p2\right)^2}dt$$
Now substituting $$m=t+p/2$$,$$=\frac{2e^{\frac{p^2}4}}{p\sqrt\pi}\int_{\frac p2}^{\infty}e^{-m^2}dm=\frac{2e^{\frac{p^2}4}}{p\sqrt\pi}\left[\int_0^{\infty}e^{-m^2}dm-\int_0^{\frac p2}e^{-m^2}dm\right]\\=\frac{e^{\frac{p^2}4}}p\left[1-\text{erf}\left(\frac p2\right)\right]$$since $$\frac2{\sqrt\pi}\int_0^{\infty}e^{-m^2}dm=1$$.