Antiderivative of a product of a rational function and a square root. Let $0<x<1$ and $p$ be a non-negative integer.
Consider a following definite integral:
\begin{equation}
{\mathbb I}_p(x):=\int\limits_1^x \frac{(1-v^2)^p}{v^{2p+2}} \cdot \sqrt{\frac{1-v}{1+v}} dv
\end{equation}
We have computed it in a following way. Firstly we substituted for the square root and reduced the problem to integrating a rational function. Then we decomposed the resulting rational function into simple fractions and by integrating terms by term we completed the computation. The result reads:
\begin{equation}
{\mathbb I}_p(x) = (-1)^p 2 \binom{p-\frac{1}{2}}{-\frac{1}{2}} \text{arctanh}(\sqrt{\frac{1-x}{1+x}})+\frac{\sqrt{1-x^2}}{x^{2 p+1}} \cdot\sum\limits_{l=0}^{2 p} {\mathcal C}_{l,p} x^l
\end{equation}
where the coefficients read:
\begin{eqnarray}
&&{\mathcal C}_{l,p} := \sum _{q=0}^{\left\lfloor \frac{l}{2}\right\rfloor } 
\frac{\sqrt{\pi } 2^{-l+2 q+1} (-l+2 p+q)! \binom{4 p+2}{l-2 q} \binom{-l+2 p+2 q+1}{2 q+1} }
{\left(-q-\frac{3}{2}\right)! (-l+2 p+2 q+1) (-l+2 p+2 q+1)!}
\, _3F_2\left(-p-1,l-4 p-2 q-2,2 q-l;-2 p-1,-2 p-\frac{1}{2};1\right)\\
&&=
\left(
\begin{array}{c}
 \{-1\} \\
 \left\{-\frac{1}{3},\frac{1}{2},\frac{1}{3}\right\} \\
 \left\{-\frac{1}{5},\frac{1}{4},\frac{2}{5},-\frac{5}{8},-\frac{1}{5}\right\} \\
 \left\{-\frac{1}{7},\frac{1}{6},\frac{3}{7},-\frac{13}{24},-\frac{3}{7},\frac{11}{16},\frac{1}{7}\right\} \\
 \left\{-\frac{1}{9},\frac{1}{8},\frac{4}{9},-\frac{25}{48},-\frac{2}{3},\frac{163}{192},\frac{4}{9},-\frac{93}{128},-\frac{1}{9}\right\} \\
 \left\{-\frac{1}{11},\frac{1}{10},\frac{5}{11},-\frac{41}{80},-\frac{10}{11},\frac{171}{160},\frac{10}{11},-\frac{149}{128},-\frac{5}{11},\frac{193}{256},\frac{1}{11}\right\} \\
\end{array}
\right)
\end{eqnarray}
Above we have given numerical values of those coefficients for $p=0,\dots,5$ (rows) and $l=0,\dots,2 p$ (columns). Now the question is can we come up with some closed form solution for the coefficients. Note that even at the first glance we see that in case $l=0$ and $l=p$ there is a closed form. What about other values of $l$?
 A: $\newcommand{\bbx}[1]{\,\bbox[8px,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}$

With
  $\ds{t \equiv {1 - v \over 1 + v} \implies
v = {1 - t \over 1 + t}}$:

\begin{align}
{\mathbb I}_{p}\pars{x} & = \int_{1}^{x}{\pars{1 -v^{2}}^p \over v^{2p + 2}} \,\root{1 - v \over 1 + v}\,\dd v =
\stackrel{t^{2}\ \mapsto\ t}{=}\,\,\,
-\,2^{\,2p + 1}\int_{0}^{\pars{1 - x}/\pars{1 + x}}
t^{p + 1/2}\pars{1 - t}^{-2p - 2}\,\dd t
\\[5mm] & =
\bbx{\ds{-2^{2p + 1}\,
\mrm{B}\pars{{1 - x \over 1 + x},p + {3 \over 2},-2p - 1}}}
\end{align}
where $\ds{\,\mrm{B}}$ is the Incomplete Beta Function. Note that
$\ds{\Re\pars{p + {1 \over 2}} > - 1 \implies \Re\pars{p} > -\,{3 \over 2}}$.
A: Let us complete the calculation given above by Felix Marin. Clearly that result above is correct however it can be simplified further and what's more important expressed through elementary functions. We demonstrate here how is this done. Firstly we use the series expansion of the incomplete beta function. We have:
\begin{equation}
{\mathbb I}_p(x) = -2^{2 p+1} \left(\frac{1-x}{1+x} \right)^{p+3/2} \cdot \sum\limits_{n=0}^\infty \frac{(2+2 p)^{(n)}}{(p+3/2+n) n!} \cdot \left(\frac{1-x}{1+x}\right)^n
\end{equation}
Now, the point is that the coefficient under the sum (in front of the $n$th power)is a rational function in $n$ and as such can be decomposed into simple fractions. In fact the decomposition will consist of a polynomial of order $2 p$ and one fraction only. To be precise we have:
\begin{equation}
\frac{(2+2 p)^{(n)}}{(p+3/2+n) n!}  = \frac{1}{2 p+1} \sum\limits_{j=0}^{2 p} \frac{(-p-1/2)^{(j)}}{(2p-j+1)^{(j)}} \cdot \binom{n+2 p+1}{2 p-j} - \binom{p-1/2}{2 p} \cdot \frac{1}{2 n+2 p+3}
\end{equation}
The only thing we need to do now is to multiply both sides of the above by $y^n$ (here $y:=(1-x)/(1+x)$) and sum over $n=0,1,\cdots,\infty$. Here we use the following, easily derived by means of elementary methods, identities:
\begin{eqnarray}
\sum\limits_{n=0}^\infty \binom{n+2 p+1}{2p-j} y^n &=& \sum\limits_{l=0}^{2p-j} \binom{2p+1}{j+l+1} \cdot \frac{y^l}{(1-y)^{l+1}}\\
\sum\limits_{n=0}^\infty \frac{y^n}{(2 n+2 p+3)} &=& \frac{1}{y^{p+3/2}} \left[ \text{arctanh}(\sqrt{y}) - \sum\limits_{j=0}^p \frac{(\sqrt{y})^{2 j+1}}{2j+1} \right]
\end{eqnarray}
The final result is then as follows:
\begin{eqnarray}
&&{\mathbb I}_p(x)=\\
&&2 (-1)^p \binom{p-1/2}{-1/2} \text{arctanh}(\sqrt{y})-\\
&&\frac{2^{2p+1} y^{p+3/2}}{2p+1}\sum\limits_{l=0}^{2 p} \binom{2p+1}{l+1}\, _3F_2\left(1,l-2 p,-p-\frac{1}{2};l+2,-2 p;1\right) \frac{y^l}{(1-y)^{l+1}}\\
&&-\sqrt{y} \binom{p-1/2}{-1/2} (-1)^p \sum\limits_{j=0}^p \frac{y^j}{2j+1}
\end{eqnarray}
There are two things to be noted. Firstly, this is an elementary function. Secondly, we can already see that the first term on the right hand side is identical with that in the formulation of the problem. The remaining terms need to be simplified further and then the unknown coefficients will be extracted. We will complete this task as soon as possible.
