# Inverse Laplace Transform using contour integration

So math stack exchange isn't really helping much with this. So initially, I'm proving the inverse laplace transform using contour integration. This is a good starting point for my research when I eventually need to find the inverse laplace transform when the functions could not be found in tables. I need to prove that: $$\DeclareMathOperator{\erfc}{erfc} \mathscr{L}^{-1} \bigg[ \frac{1}{s}\big(\exp (- \sqrt{s/k}x)\big) \bigg] = \erfc\left(\frac{x}{2\sqrt{kt}}\right)$$ This inverse laplace transform can be found using a table of Laplace Transforms. Using the following contour:

Then, after considering all contributions of this contour to get: $$\mathscr{L}^{-1} \bigg[ \frac{1}{s}\big(\exp (- \sqrt{s/k}x)\big) \bigg] = 1 - \frac{1}{\pi} \int_{0}^{\infty} \exp(-ut) \sin(\sqrt{u/k} x) \frac{du}{u}$$ Here, we can simplify the integral by letting: $$v^{2} = ut$$ and $$y = x/\sqrt{kt}$$ to get: $$\mathscr{L}^{-1} \bigg[ \frac{1}{s}\big(\exp (- \sqrt{s/k}x)\big) \bigg] = 1 - \frac{2}{\pi} \int_{0}^{\infty} \exp(-v) \sin(yv) \frac{dv}{v}.$$ How do I continue from here to eventually get to : $$1 - erf\left(\frac{y}{2}\right) = 1 - erf\left(\frac{x}{2\sqrt{kt}}\right)$$

• Thanks for the update showing the source for the figure — but what is the source for using this contour with this problem?
– user44143
Commented Dec 23, 2020 at 8:14
• This is also another source: youtube.com/watch?v=hu6q4JtKNfc&ab_channel=MatheMagician Commented Dec 23, 2020 at 8:41
• Do I understand your question: How to calculate the last integral? Why not use Mathematica, Maple, Sage, ...? Commented Dec 23, 2020 at 8:45
• well, the point is to show that the inverse laplace transform can be derived analytically using contour integration even though its tedious. Commented Dec 23, 2020 at 8:48
• The comman of Mathematica InverseLaplaceTransform[1/s*Exp[-Sqrt[s/k]*x], s, t] performs $$\fbox{\frac{k^{3/2} \text{erfc}\left(\frac{x}{2 \sqrt{k t}}\right)}{\sqrt{k^3}}\text{ if }x>0}.$$ Commented Dec 26, 2020 at 8:06

There should be a $$\exp(-v^2)$$ instead of $$\exp(-v)$$ in your last integral.
Define $$I(y)=\int_0^\infty e^{-v^2} \frac{\sin(yv)}{v} \,dv$$. We have $$I(0)=0$$ and $$I'(y)=\int_0^\infty e^{-v^2} \cos(yv) \,dv.$$
We prove $$I'(y)\overset{(*)}{=}\frac{\sqrt{\pi}}{2}e^{-y^2/4}$$ and we conclude $$I(y)=\frac{\pi}{2} \text{erf}(y/2)$$ by the definition of $$\text{erf}(x)$$ as the integral of such function that vanishes at $$x=0$$.
We prove $$(*)$$ with Feynman's method once again. We have $$I'(0)=\int_0^\infty e^{-v^2}\,dv =\frac{\sqrt{\pi}}{2}$$ and
$$I''(y)=-\int_0^\infty e^{-v^2} v \sin(yv) \,dv = \left[ \frac{e^{-v^2}}{2}\sin(yv) \right]_{v=0}^{v=\infty} - \frac{y}{2}\int_0^\infty e^{-v^2}\cos(yv) \,dv = - \frac{y}{2} I'(y).$$ The solution is indeed $$I'(y)=\frac{\sqrt{\pi}}{2} e^{-y^2/4}$$.
Another way to prove $$(*)$$. Use Euler's formula for $$\cos(yx)$$, complete the square and finally change variable linearly (note that the integral will be on an horizontal line different from the real, but this is allowed since the integrand is holomorphic).