Compute integral $\int_{0}^{1} t^{i\eta}(1-tz)^{-2} \, \mathrm{d}t$ analytically I need to compute hypergeometric function:
$$_2F_1(1+i\eta, 2; 2+i\eta, z)$$
After applying the integral representation, the task is now to compute integral:
$$\int_{0}^{1} t^{i\eta}(1-tz)^{-2} dt$$
It can be computed numerically, but it takes a lot of operations. In order to speed up computation process I want to compute this integral analytically. But I can't find out the antiderivative function.
If it is possible, how to compute this integral analytically?
 A: You can always expand in a series starting with the geometric series:
$$
       \frac{1}{1-u}=\sum_{n=0}^{\infty}u^{n},\;\; \frac{1}{(1-u)^{2}}=\sum_{n=1}^{\infty}nu^{n-1}=\sum_{n=0}^{\infty}(n+1)u^{n}.
$$
Then, for $|z| < 1$, $\eta \in\mathbb{R}$, 
$$
    \int_{0}^{1}\frac{t^{i\eta}}{(1-tz)^{2}}dt = \sum_{k=0}^{\infty}(k+1)\int_{0}^{1}t^{k}t^{i\eta}\,dt z^{k}=\sum_{k=0}^{\infty}(k+1)\frac{z^{k}}{k+1+i\eta}
$$
It's not hard to bound the error caused by truncating the series because the series is so close to the geometric series. However, you didn't say much about the values of $z$ and $\eta$ that you want to use. For example, if $\eta$ is real, the error series caused by truncating at $n=N$ would be
$$
      \left|\sum_{k=N+1}^{\infty}\frac{k+1}{k+1+i\eta}z^{k}\right|
         \le\sum_{k=N+1}^{\infty}|z|^{k}=\frac{1}{1-|z|}|z|^{N+1}.
$$
This may or may not be better than the integral you are trying to compute.
A: $\newcommand{\+}{^{\dagger}}%
 \newcommand{\angles}[1]{\left\langle #1 \right\rangle}%
 \newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}%
 \newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}%
 \newcommand{\ceil}[1]{\,\left\lceil #1 \right\rceil\,}%
 \newcommand{\dd}{{\rm d}}%
 \newcommand{\down}{\downarrow}%
 \newcommand{\ds}[1]{\displaystyle{#1}}%
 \newcommand{\equalby}[1]{{#1 \atop {= \atop \vphantom{\huge A}}}}%
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}%
 \newcommand{\fermi}{\,{\rm f}}%
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}%
 \newcommand{\half}{{1 \over 2}}%
 \newcommand{\ic}{{\rm i}}%
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}%
 \newcommand{\isdiv}{\,\left.\right\vert\,}%
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}%
 \newcommand{\ol}[1]{\overline{#1}}%
 \newcommand{\pars}[1]{\left( #1 \right)}%
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}%
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,#2\,}\,}%
 \newcommand{\sech}{\,{\rm sech}}%
 \newcommand{\sgn}{\,{\rm sgn}}%
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}%
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
\begin{align}
&\color{#00f}{\large\int_{0}^{1}{t^{\ic\eta} \over \pars{1 - tz}^{2}}\,\dd t}=
{1 \over z}\int_{t=0}^{t=1}t^{\ic\eta}\,\dd\pars{1 \over 1 - tz}
={1 \over z\pars{1 - z}}
- {1 \over z}\int_{0}^{1}{\ic\eta\,t^{\ic\eta -1} \over 1 - tz}\,\dd t
\\[3mm]&=
{1 \over z\pars{1 - z}}
+ {\ic\eta \over z}\int_{\infty}^{0}
{\expo{-\pars{\ic\eta - 1}x} \over 1 - \expo{-x}z}\,\pars{-\expo{-x}}\,\dd x
=
{1 \over z\pars{1 - z}}
+ {\ic\eta \over z}\int^{\infty}_{0}{\expo{-\ic\eta x} \over 1 - \expo{-x}z}\,\dd x
\\[3mm]&=
{1 \over z\pars{1 - z}}
+ {\ic\eta \over z}\int^{\infty}_{0}\expo{-\ic\eta x}
\sum_{\ell = 0}^{\infty}\pars{\expo{-x}z}^{\ell}\,\dd x
=
{1 \over z\pars{1 - z}}
+ {\ic\eta \over z}\sum_{\ell = 0}^{\infty}z^{\ell}
\int^{\infty}_{0}\expo{-\pars{\ell + \ic\eta}x}\,\dd x
\\[3mm]&=
\color{#00f}{\large{1 \over z\pars{1 - z}}
+ {\ic\eta \over z}
\underbrace{\sum_{\ell = 0}^{\infty}{z^{\ell} \over \ell + \ic\eta}}
_{\ds{\Phi\pars{z,1,\ic\eta}}}}\,,\qquad \verts{z} < 1
\end{align}
$\ds{\Phi\pars{z,s,a}}$ is the $\ $HurwitzLerchPhi$\ $ function.
