According to [NIST](https://dlmf.nist.gov/13.16#E5), the integral representation of Whittaker $W$ functions
$$
W\_{\kappa,\mu}\left(z\right)=\frac{z^{\mu+\frac{1}{2}}2^{-2\mu}}{\Gamma\left(%
\frac{1}{2}+\mu-\kappa\right)}\int\_{1}^{\infty}e^{-\frac{1}{2}zt}(t-1)^{\mu-%
\frac{1}{2}-\kappa}(t+1)^{\mu-\frac{1}{2}+\kappa} \,dt \qquad (\star)
$$
is valid only for **$\mathrm{Re}(z)>0$**.



> 
> **Question.** Is there an appropriate way to evaluate the RHS of $(\star)$ when $z$ is pure imaginary?
> 
> 
> 


I came across the same integral with $z$ replaced by **$w\in\mathrm{i}\, \mathrm{R}$**. And I forcibly applied the formula $(\star)$ and I found some contradictions in the final results.



On integral representation of Whittaker $W$ functions
When $2\mu$ is not an integer one has this [identity](https://dlmf.nist.gov/13.14.E33) between the two Whittaker functions $W$ and $M$,
$$W\_{\kappa,\mu}\left(z\right)=\frac{\Gamma\left(-2\mu\right)}{\Gamma\left(\frac%
{1}{2}-\mu-\kappa\right)}M\_{\kappa,\mu}\left(z\right)+\frac{\Gamma\left(2\mu%
\right)}{\Gamma\left(\frac{1}{2}+\mu-\kappa\right)}M\_{\kappa,-\mu}\left(z%
\right).$$
Then for the Whittaker-$M$ function one can use the [integral representation](https://dlmf.nist.gov/13.16.E1)
$$M\_{\kappa,\mu}\left(z\right)=\frac{\Gamma\left(1+2\mu\right)z^{\mu+\frac{1}{2}%
}2^{-2\mu}}{\Gamma\left(\frac{1}{2}+\mu-\kappa\right)\Gamma\left(\frac{1}{2}+%
\mu+\kappa\right)}\int\_{-1}^{1}e^{\frac{1}{2}zt}(1+t)^{\mu-\frac{1}{2}-%
\kappa}(1-t)^{\mu-\frac{1}{2}+\kappa}\mathrm{d}t,$$
which holds for any complex $z$ if $\Re\mu+1/2>|\Re \kappa|$.


