For a script I have to evaluate the associated Legendre polynomial of second kind $Q^0\_{n}(z)$.


Until now, I was using an implementation that is based on the definition in equation 8.702 in the Book "[Table of Integral, Series and Products](http://fisica.ciens.ucv.ve/%7Esvincenz/TISPISGIMR.pdf)" by Gradshteyn.


When I insert $n=-3/2$, Matlab returns NaN, and for the term that is related to the hypergeometric function -Inf is returned. Also the book says that the expression for $Q^0\_{n}(z)$ looses its meaning for $n=-3/2$. Are there other possibilities to obtain $Q^0\_{-3/2}(z)$ especially for real valued $z>1$. From the expressions in Gradshteyn I expect real valued solutions however the Mathematica function LegendreQ returns complex values. Where does this come from?


Many thanks for any help



How are the Legendre Polynomials of second kind for negative degrees defined?
It helps to rewrite the expression from Gradshteyn,
$$Q\_\nu^0(z)=\frac{ \Gamma \left(\frac{1}{2}\right) \Gamma (\nu+1)\, \_2F\_1\left(\frac{\nu}{2}+1,\frac{\nu}{2}+\frac{1}{2};\nu+\frac{3}{2};\frac{1}{z^2}\right)}{2^{\nu+1}z^{\nu+1} \Gamma \left(\nu+\frac{3}{2}\right)},$$
in terms of the [regularized hypergeometric function](https://mathworld.wolfram.com/RegularizedHypergeometricFunction.html),
$$Q\_\nu^0(z)=\sqrt{\pi } (2z)^{-\nu-1} \Gamma (\nu+1) \, \_2\tilde{F}\_1\left(\tfrac{\nu}{2}+1,\tfrac{\nu}{2}+\tfrac{1}{2};\nu+\tfrac{3}{2};\frac{1}{z^2}\right).$$
This representation remains well-defined for $\nu=-3/2$. You can then transform back to the ordinary hypergeometric function, by means of the identity
$$\, \_2\tilde{F}\_1(a,b;0;x)=a b x \, \_2F\_1(a+1,b+1;2;x),$$
arriving at
$$Q\_{-3/2}^0(z)=\frac{\pi \, \_2F\_1\left(\frac{5}{4},\frac{3}{4};2;\frac{1}{z^2}\right)}{4 \sqrt{2} z^{3/2}}.$$


