0
$\begingroup$

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" 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

$\endgroup$

1 Answer 1

2
$\begingroup$

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, $$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}}.$$

$\endgroup$
6
  • $\begingroup$ Thank you very much. Do you know where I can find more explanatory material on the implementation of Mathematicas LegendreQ. I would like to understand where the real and imaginary part is coming from. $\endgroup$ Commented Jul 10, 2023 at 10:06
  • $\begingroup$ I don't know how Mathematica implements LegendreQ, but there is no need to go through Mathematica, you can just take the limit of Gradshteyn's expression. $\endgroup$ Commented Jul 10, 2023 at 10:13
  • $\begingroup$ Thank you for adding more explainations. However I wasn't able to verify your transformation from the first to the second formula for $Q^0_\nu(z)$ by implementation, is it possible that there is a typo? $\endgroup$ Commented Jul 10, 2023 at 12:29
  • 1
    $\begingroup$ I compared the two expressions with Mathematica, and they are identical: FullSimplify[Gamma[1/2]*Gamma[nu + 1]* Hypergeometric2F1[nu/2 + 1, nu/2 + 1/2, nu + 3/2, 1/z^2]/(2^(nu + 1)*z^(nu + 1)*Gamma[nu + 3/2])] $\endgroup$ Commented Jul 10, 2023 at 12:40
  • $\begingroup$ I see, I was running the same line in Mathematica and received the same output. But I still have the same issue in Matlab. Do you have a reference for the third formula? The documentation of Mathematica says $\bar{F}_1(a,b;c;x)=F_1(a,b;c;x)/\Gamma(c)$ which gives me a different but also wrong result $\endgroup$ Commented Jul 10, 2023 at 13:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .