A handy way of inverting Laplace transforms is the use of the Bromwich integral combined with the use of the Cauchy residue theorem. Below I will demonstrate an example where I can invert the Laplace transform analytically obtaining a closed form expression. On the other hand by using the Cauchy theorem I will get a completely wrong result which confuses me a lot. I would like to understand where is the error in my reasoning.
Let us take $x > b >0 $, $\theta < 1$, $\mu_0 <1/2 $ and $\nu = (1-2 \mu_0)/(2(1-\theta)) $ and then let us consider a following function below. We have:
\begin{eqnarray} u_\alpha^{(b)}(x) &:=& E_x \left[ e^{-\alpha \tau_b} \right] \\ &=& \left( \frac{x}{b} \right)^{\frac{1}{2} - \mu_0} \cdot \frac{K_\nu\left[ \sqrt{2} \frac{x^{1-\theta}}{1-\theta} \sqrt{\alpha}\right]}{K_\nu\left[ \sqrt{2} \frac{b^{1-\theta}}{1-\theta} \sqrt{\alpha}\right]} \tag{1} \end{eqnarray}
Note that the quantity in $(1)$ is a valid Laplace transform. Indeed we know from here that for small values of $ z $ the modified Bessel function of the second kind behaves as $ K_\nu(z) \simeq z^{-\nu} $ for $ \nu > 0 $. As such it is clearly seen that $ \lim_{\alpha \rightarrow 0} u_\alpha^{(b)}(x) = 1 $ as it should be.
It turns out ---- Ito, K.; McKean, H. P. jun., Diffusion processes and their sample paths, Berlin-Heidelberg-New York: Springer-Verlag. XVII, 321 p. (1965). ZBL0127.09503. section 4.6 page 130. ---- that the quantity above is a Laplace transform of the distribution of the first hitting time $ \tau_b := inf(t>0 | X_t > b) $, given $X_0 = x$, in an one-dimensional diffusion process of the kind $d X_t = \mu_0 X_t^{2 \theta-1} dt + X_t^\theta d B_t $ where $\theta \in [1/2,1) $ with $B_t$ being the Brownian motion.
Let us now take $\nu = 1/2 $ , which implies $\mu_0 = \theta/2$, and let us compute the inverse Laplace transform in two different ways.
First way:
We define ${\mathfrak A}(x,b) := (x^{1-\theta} - b^{1-\theta})/(1-\theta) $ and we firstly compute the Bromwich integral analytically as below:
\begin{eqnarray} \rho_{\tau_b}(t) &=& \frac{1}{2\pi \imath} \int\limits_{\imath {\mathbb R}} e^{\alpha \cdot t} \cdot u_\alpha^{(b)}(x) d\alpha \\ &=& \frac{1}{2\pi} \left( \frac{b}{x} \right)^{\mu_0-\theta/2} \int\limits_{\mathbb R} e^{\imath \alpha t} e^{-\sqrt{2} \sqrt{\imath \alpha} {\mathfrak A}(x,b)} d \alpha \\ &=& \frac{1}{2\pi} \left( \frac{b}{x} \right)^{\mu_0-\theta/2} 2 Re\left[ \int\limits_0^\infty 2 \beta e^{\imath (\beta^2 t - \beta {\mathfrak A}(x,b))} e^{-\beta {\mathfrak A}(x,b)} d\beta \right] \\ &=& \left( \frac{b}{x} \right)^{\mu_0-\theta/2} \frac{1}{\sqrt{2 \pi}} t^{-3/2} {\mathfrak A}(x,b) e^{-\frac{{\mathfrak A}(x,b)^2}{2 t}} \end{eqnarray}
In[1952]:= {b, z} = RandomReal[{1/2, 3/2}, 2]; alpha =.;
x = RandomReal[{2 b, 10}];
th = RandomReal[{1/2, 1}];
nu = 1/2;
mu0 = 1/2 - nu (1 - th);
NIntegrate[
Exp[I alpha z] (
x^(1/2 - mu0)
BesselK[nu, (Sqrt[2] Sqrt[(I alpha)] x^(1 - th))/(1 - th)])/(
b^(1/2 - mu0)
BesselK[nu, (Sqrt[2] Sqrt[(I alpha)] b^(1 - th))/(
1 - th)]), {alpha, -Infinity, Infinity}]/(2 Pi)
(b/x)^(mu0 - th/2)
NIntegrate[
Exp[I alpha z] E^(((b x)^-th (Sqrt[2] Sqrt[
I alpha] (b^th x - b x^th)))/(-1 + th)) , {alpha, -Infinity,
Infinity}]/(2 Pi)
(b/x)^(mu0 - th/
2) 2 Re[NIntegrate[
2 beta Exp[
I beta^2 z] E^(-( ((1 + I) beta (x^(1 - th) - b^(1 - th)))/(
1 - th))) , {beta, 0, Infinity}]]/(2 Pi)
A = ( (x^(1 - th) - b^(1 - th)))/(1 - th);
(b/x)^(mu0 - th/
2) 2 Re[NIntegrate[
2 beta Exp[I (beta^2 z - beta A)] E^- ( beta A), {beta, 0,
Infinity}]]/(2 Pi)
(b/x)^(mu0 - th/2) (A E^(-(A^2/(2 z))) Sqrt[1/(2 \[Pi])])/z^(3/2)
During evaluation of In[1952]:= Infinity::indet: Indeterminate expression 0 \[Infinity] encountered.
During evaluation of In[1952]:= Infinity::indet: Indeterminate expression 0 \[Infinity] encountered.
Out[1957]= 0.00352682 + 2.03297*10^-13 I
Out[1958]= 0.00352682 + 2.03297*10^-13 I
Out[1959]= 0.00352682
Out[1961]= 0.00352682
Out[1962]= 0.00352682
In the first line from the top we just inserted the definition of the Laplace transform into the integral, in the second line we substituted $\beta = \sqrt{\alpha}$ and finally we did the integral analyticaly. It is easy to see that the result is a true probability distribution being supported on the positive half-axis. It integrates to one.
Second way:
We use the Cauchy residue theorem as applied to the contour below:
Bear in mind that we took $\nu = 1/2$. Then the modified Bessel function in question is given in closed form and we know that the Laplace transform $u_\alpha^{(b)}(x) $ does not have any poles in the negative complex half plane. Therefore we can just write:
\begin{eqnarray} \frac{1}{2\pi \imath} \int\limits_{\Gamma_1} e^{\alpha \cdot t} \cdot u_\alpha^{(b)}(x) d\alpha + \frac{1}{2\pi \imath} \int\limits_{\Gamma_2} e^{\alpha \cdot t} \cdot u_\alpha^{(b)}(x) d\alpha = 0 \\ \Leftrightarrow \rho_{\tau_b}(t) + \frac{1}{2\pi} \left( \frac{b}{x} \right)^{\mu_0-\theta/2} \int\limits_{\pi/2}^{3/2\pi} e^{R e^{\imath \phi} t} e^{-\sqrt{2} \sqrt{R e^{\imath \phi}} {\mathfrak A}(x,b)} \imath R e^{\imath \phi} d\phi = 0 \end{eqnarray} Now, clearly the second integral above disappears in the limit $R \rightarrow +\infty$ because $Re[ R e^{\imath \phi} ] <0 $ for $\phi \in [\pi/2,3/2\pi] $.
This would imply that our probability distribution is just identically zero which is obviously wrong.
Where is then the error in my reasoning?






Owing to to Steven Gubkin's comment above and also to a great blog post on those things we can give an answer straight away. Here we do this for $\nu= 1/2$ only but it might be possible to do it in general ; we simply need to identify all the branching points in the later case.
Let us assume that $\nu= 1/2$. We apply the Cauchy theorem to the contour below where the distance of the vertical line in the positive half-plane from the imaginary axis is $c$ and the radius of the circle is $R$. We have:
Again, by means of the Cauchy theorem the sum of the five integrals below is equal to zero. We have:
\begin{eqnarray} \int\limits_{c - \imath \sqrt{R^2-c^2}}^{c + \imath \sqrt{R^2-c^2}} d\alpha e^{-\sqrt{2} {\mathfrak A} \sqrt{\alpha}} \cdot e^{\alpha t} + \underline{\int\limits_{\frac{\pi}{2} - \arcsin(\frac{c}{R})}^\pi R\imath e^{\imath \phi} d\phi \cdot e^{-\sqrt{2} {\mathfrak A} \sqrt{R e^{\imath \phi}}} \cdot e^{R e^{\imath \phi} t}} + \int\limits_0^R e^{-\sqrt{2} {\mathfrak A} \imath \sqrt{\alpha}} \cdot e^{-\alpha t} d\alpha - \int\limits_0^R e^{+\sqrt{2} {\mathfrak A} \imath \sqrt{\alpha}} \cdot e^{-\alpha t} d\alpha + \underline{\int\limits_{\pi}^{\frac{3 \pi}{2} + \arcsin(\frac{c}{R})} R\imath e^{\imath \phi} d\phi \cdot e^{-\sqrt{2} {\mathfrak A} \sqrt{R e^{\imath \phi}}} \cdot e^{R e^{\imath \phi} t}} = 0 \end{eqnarray}
I think that everything above is pretty straightforward except for one thing, i.e. that as we go around the small circle next to the origin we gain a phase, i.e. $\sqrt{\alpha} \rightarrow - \sqrt{\alpha} $ and that is why the integrals along the horizontal intervals next to the negative real axis do not cancel each other.
Now let us analyze the second an the fifth terms. We have:
\begin{eqnarray} &&2nd + 5th= \\ &&\int\limits_{\frac{\pi}{2} - \arcsin(\frac{c}{R})}^{\frac{3\pi}{2} + \arcsin(\frac{c}{R})} R\imath e^{\imath \phi} d\phi \cdot e^{-\sqrt{2} {\mathfrak A} \sqrt{R e^{\imath \phi}}} \cdot e^{R e^{\imath \phi} t} \underbrace{=}_{\zeta = e^{\imath \pi}} \\ &&\int\limits_{\frac{c}{R} + \imath \sqrt{1- \frac{c^2}{R^2}}}^{\frac{c}{R} - \imath \sqrt{1- \frac{c^2}{R^2}}} d\zeta e^{-\sqrt{2}{\mathfrak A} \sqrt{R \zeta}} \cdot e^{R \zeta t} \underbrace{=}_{R\rightarrow \infty}\\ && \int\limits_{\frac{c}{R} + \imath}^{\frac{c}{R}-\imath} d \zeta e^{R \zeta t} = \\ && e^{c t} (-2 \imath) \frac{\sin(R t)}{R t} \underbrace{=}_{R \rightarrow \infty} \\ && (-2\imath \pi) e^{c t} \delta(t) \end{eqnarray}
We can see that except for $t=0$ the contribution from the arcs in the contour vanish. We are therefore left with three terms only. In the limit $R \rightarrow \infty$ we have:
\begin{eqnarray} &&\int\limits_{c - \imath \infty}^{c + \imath \infty} e^{-\sqrt{2} {\mathfrak A} \sqrt{\alpha}} \cdot e^{\alpha t} d\alpha = \int\limits_0^\infty \left[ e^{+\sqrt{2} {\mathfrak A} \imath \sqrt{\alpha}} - e^{-\sqrt{2} {\mathfrak A} \imath \sqrt{\alpha}}\right] e^{-\alpha t} d\alpha \\ % 1st &&= 2 \imath \cdot e^{- \frac{{\mathfrak A}^2}{2 t}} \cdot Im \left[ \int\limits_0^\infty e^{-t(\beta - \frac{{\mathfrak A}}{\sqrt{2} t} \imath)^2} 2 \beta d\beta\right] \\ % 2nd &&= 2 \imath \cdot e^{- \frac{{\mathfrak A}^2}{2 t}} \cdot Im \left[ \int\limits_{{\mathbb R}_+ } e^{-t \beta^2} 2\left[\beta + \frac{{\mathfrak A}}{\sqrt{2} t} \imath\right] d\beta + \int\limits_{\imath [-\frac{{\mathfrak A}}{\sqrt{2} t}, 0] } e^{-t \beta^2} 2\left[\beta + \frac{{\mathfrak A}}{\sqrt{2} t} \imath\right] d\beta \right] \\ %3 rd &&= 2 \imath \cdot e^{- \frac{{\mathfrak A}^2}{2 t}} \cdot Im\left[ \int\limits_{{\mathbb R}_+} e^{-t \beta^2} 2 \frac{{\mathfrak A}}{\sqrt{2} t} \imath d\beta \right] \\ &&= 2 \imath \cdot e^{- \frac{{\mathfrak A}^2}{2 t}} \cdot \frac{{\mathfrak A}}{\sqrt{2} t^{3/2}} \cdot 2 \underbrace{\int\limits_0^\infty e^{-\beta^2} d\beta}_{ \frac{\sqrt{\pi}}{2}} \\ && = 2 \imath \cdot e^{- \frac{{\mathfrak A}^2}{2 t}} \cdot \frac{{\mathfrak A}}{\sqrt{2} t^{3/2}} \cdot \sqrt{\pi} \\ && (2\pi \imath ) \cdot e^{- \frac{{\mathfrak A}^2}{2 t}} \cdot \frac{{\mathfrak A}}{t^{3/2}} \cdot \frac{1}{\sqrt{2\pi}} \end{eqnarray}
Note: The step from the second to the third line involves a substitution $\beta - {\mathfrak A} \imath/(\sqrt{2} t) \rightarrow \beta$ and then using the Cauchy theorem applied to an infinite strip in the forth quadrant.
Then we need to multiply the result by the prefactor $(b/x)^{\mu_0 - \theta/2} $ and we retrieve the pdf of the first hitting time from the body of the question. q.e.d.