How to merge odd series and even series of hypergeometric function of Legendre polynomials into one hypergeometric function? On the Wolfram MathWorld page of Legendre Differential Equation, Legendre polynomials are represented as
$$
P_l(x) = c_n
\begin{cases}\begin{align*}
&_2F_1\left(-\frac{1}{2}(l), \frac{1}{2}(l + 1); \frac{1}{2}; x^2\right) && \text{for even } l\\
&x_2F_1\left(\frac{1}{2}(l + 2), \frac{1}{2}(1 - l); \frac{3}{2}; x^2\right) && \text{for odd } l \\
\end{align*}\end{cases}\tag{1}
$$
I also know Legendre polynomials can be written in this single hypergeometric function.
$$
{}_2F_1\left(l + 1, -l; 1; \frac{1 - x}{2}\right) \tag{2}
$$
How to merge (1) to get (2)?
 A: A quadratic transform for the Gaussian hypergeometric function exists which links (1) and (2):
\begin{align}
 { }_2 F_1\left(a, b ; \frac{a+b+1}{2} ; z\right)&= \\
 &\frac{\sqrt{\pi} \Gamma\left(\frac{a+b+1}{2}\right)}{\Gamma\left(\frac{a+1}{2}\right) \Gamma\left(\frac{b+1}{2}\right)}{ }_2 F_1\left(\frac{a}{2}, \frac{b}{2} ; \frac{1}{2} ;(2 z-1)^2\right)+\\
 &+\frac{2 \sqrt{\pi}(2 z-1) \Gamma\left(\frac{a+b+1}{2}\right)}{\Gamma\left(\frac{a}{2}\right) \Gamma\left(\frac{b}{2}\right)}{ }_2 F_1\left(\frac{a+1}{2}, \frac{b+1}{2} ; \frac{3}{2} ;(2 z-1)^2\right)
\end{align}
Here, by choosing $a=-l,b=l+1,z=(1-x)/2$
\begin{align}
 {}_2F_1\left( -l,l+1; 1; \frac{1 - x}{2}\right)&=\frac{\sqrt{\pi}}{\Gamma\left((1-l)/2\right) \Gamma\left(1+l/2\right)}{ }_2 F_1\left(-l/2, (1+l)/2 ;1/2 ;x^2\right)+\\
  &+2x\frac{ \sqrt{\pi}}{\Gamma\left(-l/2\right) \Gamma\left((1+l)/2\right)}{ }_2 F_1\left((1-l)/2, 1+l/2 ; 3/2 ;x^2\right)
\end{align}
Now, due to the $\Gamma\left((1-l)/2\right)$ and $\Gamma\left(-l/2\right)$ in the denominators of the coefficients, the second (the first) term vanishes when $l$ is even (odd).
