Find the inverse Laplace transform in special case How to find the inverse Laplace transform of: 
$$g(x,p,x') = \begin{cases} - \dfrac{e^{\sqrt{p} x'} \sinh({\sqrt{p}x})}{ {\sqrt{p}}} & 0 < x < x' \\  -\dfrac{\sinh({\sqrt{p}x'}) e^{-\sqrt{p} x}}{{\sqrt{p}}} & x \gt x' \end{cases} $$
where  $L^{-1}\{g(x,p,x')\}=G(x,t,x')$ , meanning you can treat $x'$ and $x$ as constants.
 A: Consider the first piece of the Green's function above.
$$-p^{-1/2} e^{\sqrt{p} x'} \sinh{\sqrt{p} x} =\frac12  p^{-1/2} \left [e^{-\sqrt{p} (x'-x)} -e^{\sqrt{p} (x'+x)}  \right ]$$
You can use a contour integration as follows by deforming the Bromwich contour about the negative real axis and exploiting a branch cut of $\sqrt{z}$ about that axis.  So, consider the integral
$$\oint_C dz \: z^{-1/2} e^{-a \sqrt{z}} e^{z t}$$
where $C$ is a keyhole contour about the negative real axis, as pictured below.

We will define $\text{Arg}{z} \in (-\pi,\pi]$, so the branch is the negative real axis.  There are $6$ pieces to this contour, $C_k$, $k \in \{1,2,3,4,5,6\}$, as follows.
$C_1$ is the contour along the line $z \in [c-i R,c+i R]$ for some large value of $R$.
$C_2$ is the contour along a circular arc of radius $R$ from the top of $C_1$ to just above the negative real axis.
$C_3$ is the contour along a line just above the negative real axis between $[-R, -\epsilon]$ for some small $\epsilon$.
$C_4$ is the contour along a circular arc of radius $\epsilon$ about the origin.
$C_5$ is the contour along a line just below the negative real axis between $[-\epsilon,-R]$.
$C_6$ is the contour along the circular arc of radius $R$ from just below the negative real axis to the bottom of $C_1$.
We will show that the integral along $C_2$,$C_4$, and $C_6$ vanish in the limits of $R \rightarrow \infty$ and $\epsilon \rightarrow 0$.
On $C_2$, the real part of the argument of the exponential is
$$R t \cos{\theta} - \sqrt{R} \cos{\frac{\theta}{2}}$$
where $\theta \in [\pi/2,\pi)$.  Clearly, $\cos{\theta} < 0$ and $\cos{\frac{\theta}{2}} > 0$, so that the integrand exponentially decays as $R \rightarrow \infty$ and therefore the integral vanishes along $C_2$.
On $C_6$, we have the same thing, but now $\theta \in (-\pi,-\pi/2]$.  This means that, due to the evenness of cosine, the integrand exponentially decays again as $R \rightarrow \infty$ and therefore the integral also vanishes along $C_6$.
On $C_4$, the integral vanishes as $\epsilon$ in the limit $\epsilon \rightarrow 0$.  Thus, we are left with the following by Cauchy's integral theorem (i.e., no poles inside $C$):
$$\left [ \int_{C_1} + \int_{C_3} + \int_{C_5}\right] dz \: z^{-1/2} e^{-a \sqrt{z}} e^{z t} = 0$$
On $C_3$, we parametrize by $z=e^{i \pi} x$ and the integral along $C_3$ becomes
$$\int_{C_3} dz \: z^{-1/2} e^{-a \sqrt{z}} e^{z t} = e^{i \pi} \int_{\infty}^0 dx \: e^{-i \pi/2} x^{-1/2} e^{-i a \sqrt{x}} e^{-x t}$$
On $C_5$, however, we parametrize by $z=e^{-i \pi} x$ and the integral along $C_5$ becomes
$$\int_{C_5} dz \: z^{-1/2} e^{-\sqrt{z}} e^{z t} = e^{-i \pi} \int_0^{\infty} dx \: e^{i \pi/2} x^{-1/2} e^{i a \sqrt{x}} e^{-x t}$$
We may now write
$$-\frac{i}{i 2 \pi} \int_0^{\infty} dx \: e^{- x t} \left ( e^{i a \sqrt{x}} + e^{-i a \sqrt{x}} \right ) + \frac{1}{i 2 \pi} \int_{c-i \infty}^{c+i \infty} dp \: p^{-1/2} e^{-a \sqrt{p}} e^{p t} = 0$$
Therefore, the ILT of $\hat{f}(p) = p^{-1/2} e^{-a \sqrt{p}}$ is given by
$$\begin{align}\frac{1}{i 2 \pi} \int_{c-i \infty}^{c+i \infty} dp \: p^{-1/2} e^{-a \sqrt{p}} e^{p t} &= \frac{1}{2 \pi} \int_0^{\infty} dx \: x^{-1/2} e^{- x t} \left ( e^{i a \sqrt{x}} + e^{-i a \sqrt{x}} \right )\\ &= \frac{1}{\pi} \int_{-\infty}^{\infty} du\: \,e^{-t u^2} \cos{a u}\\ &= (\pi t)^{-1/2} e^{-a^2/(4 t)}\end{align}$$
The Green's function is therefore
$$G(x,x',t) = \frac1{2 \sqrt{\pi}} t^{-1/2} \left [e^{-(x-x')^2/(4 t)} - e^{-(x+x')^2/(4 t)} \right ] \quad 0 \lt x \lt x'$$
The case $x \gt x'$ may be analyzed similarly.
