In Mathematica's documentation, the Spherical Harmonics are said to be defined as follows, for $l \geq 0$:
Furthermore, we know that $\cos(x)=\cos(-x)$, hence one can be led to believe that $Y_l^m(-\theta,\phi)=Y_l^m(\theta,\phi)$.
A quick check with mathematica shows us that might not be the case
Table[Table[{SphericalHarmonicY[l, m, -(\[Pi]/2), 0],
SphericalHarmonicY[l, m, \[Pi]/2, 0]}, {m, -l, l}], {l, 0, 2}]
as the $l=1=m$ values differ.
Am I doing something wrong? Does the value of $\theta$ need to be in the canonical range $[0,\pi]$. If so, how do I relate $-\frac{\pi}{2}$ to something in that range. The formulae I know allow me to relate it to $\frac{3\pi}{2}$, which is still outside the range.
Simplify[Table[SphericalHarmonicY[l, m, th, ph] == Sqrt[(2 l + 1)/(4 Pi)] (Sqrt[Gamma[l - m + 1]]/Sqrt[Gamma[l + m + 1]]) Exp[I ph m] LegendreP[l, m, 2, Cos[th]], {l, 0, 2}, {m, -l, l}], 0 <= th <= Pi && 0 <= ph <= 2 Pi]
$\endgroup$ – J. M.'s ennui♦ Jan 6 at 18:51th
. That's more a failure of plainSimplify
than of the definitions. Indeed, if you change toFullSimplify
, and addComplexExpand
as aTransformationFunction
(which should be ok, since variables are real), then all results areTrue
. Or am I missing something else? $\endgroup$ – MarcoB Jan 6 at 20:07LegendreP
? The documentation allows only 3. And why the extra phase factor? Are theGamma
functions doing something under the hood, as for integer arguments, they are equvalent to factorials. $\endgroup$ – ThunderBiggi Jan 6 at 21:28LegendreP[]
modifies the branch cut convention of the Legendre function used. Please have a look at the docs for more details, but in brief, the discrepancy apparently happens since we are using "type 2" Legendre functions. $\endgroup$ – J. M.'s ennui♦ Jan 8 at 4:430 < th <= Pi
. $\endgroup$ – J. M.'s ennui♦ Jan 8 at 4:48