Solution (source code)

= Solution

For $\operatorname{Re}k>0$, choose the straight path from $-i$ to $i$ and put $t=is$, $-1\leq s\leq1$. Choose the power of $1-s^2$ continuously, positive for real positive $k$. The boundary factor vanishes at both endpoints. At zero,
$$
w(0)=i\int_{-1}^1(1-s^2)^{k-1}ds=i\int_0^1u^{-1/2}(1-u)^{k-1}du
=\boxed{iB(k,1/2)},
$$
using the symmetric <beta function> integral. This choice also gives a nonzero solution.