How to evaluate integral $\frac{1}{2 \pi i}\int \limits_{c-i \infty}^{c+i \infty} \frac{ds}{s(1-q^{1-s})}\text{?}$ How to evaluate the integral $$\frac{1}{2 \pi i}
\int \limits_{c-i \infty}^{c+i \infty} \frac{ds}{s(1-q^{1-s})}\text{?}$$ I tried with Perron's formula but I couldn't solve it. The result of the integral is $\frac{1}{2}$. Can someone help please?!
 A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$

Note that
  $\ds{\left.{1 \over 2\pi\ic}
\int_{c - \ic\infty}^{c + \ic\infty}{\dd s \over s\pars{1 - q^{1-s}}}
\right\vert_{\ \substack{c\ >\ 1\\[1mm] q\ >\ 1}} =
\int_{1^{+} - \infty\ic}^{1^{+} + \infty\ic}{1 \over
s\pars{1 - q^{1 - s}}}\,{\dd s  \over 2\pi\ic}}$.

The integrand has a single pole at $\ds{s = 0}$ and single poles at
$\ds{\quad p_{n} = 1 - {2n\pi \over \ln\pars{q}}\,\ic\quad}$ with $\ds{n \in \mathbb{Z}}$.
\begin{align}
&\int_{1^{+} - \infty\ic}^{1^{+} + \infty\ic}{1 \over
s\pars{1 - q^{1 - s}}}\,{\dd s  \over 2\pi\ic} =
{1 \over 1 - q} + \sum_{n = -\infty}^{\infty}\lim_{s \to p_{n}}
{s - p_{n} \over s\pars{1 - q^{1 - s}}}
\\[5mm] = &\
{1 \over 1 - q} + \sum_{n = -\infty}^{\infty}\lim_{s \to p_{n}}\braces{%
{1 \over 1 - q^{1 - s} + s\bracks{-q\pars{1/q}^{s}\ln\pars{1/q}}}}
\\[5mm] = &\
{1 \over 1 - q} + {1 \over \ln\pars{q}}\sum_{n = -\infty}^{\infty}
{1 \over 1 - 2n\pi\ic/\ln\pars{q}}
\\[5mm] = &\
{1 \over 1 - q} + {1 \over \ln\pars{q}} +
{2 \over \ln\pars{q}}\Re\sum_{n = 1}^{\infty}
{1 \over 1 - 2n\pi\ic/\ln\pars{q}}
\\[5mm] = &\
{1 \over 1 - q} + {1 \over \ln\pars{q}} +
{2 \over \ln\pars{q}}\sum_{n = 1}^{\infty}
{1 \over \bracks{2n\pi/\ln\pars{q}}^{\,2} + 1}
\\[5mm] = &\
{1 \over 1 - q} + {1 \over \ln\pars{q}} +
{2 \over \ln\pars{q}}\,{1 \over \bracks{2\pi/\ln\pars{q}}^{\,2}}
\sum_{n = 1}^{\infty}{1 \over n^{2} + \bracks{\ln\pars{q}/\pars{2\pi}}^{\,2}}
\label{1}\tag{1}
\\[5mm] = &\
{1 \over 1 - q} + {1 \over \ln\pars{q}} +
{\ln\pars{q} \over 2\pi^{2}}
\bracks{-\,{2\pi^{2} \over \ln^{2}\pars{q}} + \pi^{2}\,
{\coth\pars{\ln\pars{q}/2} \over \ln\pars{q}}}
\\[5mm] = &\
{1 \over 1 - q} + {1 \over 2}\,\coth\pars{\ln\pars{q} \over 2}
\\[5mm] = &\
{1 \over 1 - q} +
{1 \over 2}\,{\root{q} + 1/\root{q} \over \root{q} - 1/\root{q}} =
{1 \over 1 - q} +
{1 \over 2}\,{q + 1 \over q - 1} = \bbx{1 \over 2}
\end{align}

The sum in \eqref{1} is a well known result. Namely,
  $\ds{\sum_{n = 1}^{\infty}{1 \over n^{2} + a^{2}} =
{-1 + \pi a\coth\pars{\pi a} \over 2a^{2}}}$.

A: For some $q > 1$ let
$$f(x) = \sum_{n \ge 0,q^n < e^x} q^n$$
For $x = n \log q$ we take the mean value of the left and right limit, that is
$$f(n \log q) = \frac{f(\epsilon+n\log q)+f(-\epsilon+n\log q)}{2}$$
Thus $f(0) = 1/2$

For $\Re(s ) > 1$
$$F(s) = \frac{1}{1-q^{1-s}} = \sum_{n=1}^\infty q^n q^{-sn} = s \int_0^\infty f(x) e^{-sx}dx$$
By inverse Fourier/Laplace/Mellin transform (or Perron's formula), for $c > 1$ and $x \ne n \log q$ 
$$f(x) = \frac{1}{2i\pi} \int_{c-i \infty}^{c+i\infty} \frac{F(s)}{s} e^{sx}ds$$
With $x=0$
$$f(0) = \frac12= \frac{1}{2i\pi} \int_{c-i \infty}^{c+i\infty} \frac{F(s)}{s} ds= \frac{1}{2i\pi} \int_{c-i \infty}^{c+i\infty} \frac{1}{s(1-q^{1-s})} ds$$
And the RHS is analytic in $q$, so we can extend by analytic continuation to $q \in \mathbb{C}$, and the same for $c$.
