1
$\begingroup$

The problem I have encountered is that two different reference math books have different representations of $\theta$ and $\varphi$ for the spherical coordinate system.

enter image description here

For Figure 1: $$ 0<\theta <\pi ,\ 0<\varphi <2\pi $$ $$ dv=r^2\sin \theta d\varphi d\theta dr $$ For Figure 2: $$ 0<\varphi <\pi ,\ 0<\theta <2\pi $$ $$ dv=r^2\sin \varphi d\theta d\varphi dr $$

The spherical harmonic function in Mathematica is defined as follows:

SphericalHarmonicY[l, m, \[Theta], \[Phi]] 

I would like to know which of the two plots above corresponds to $\theta$ and $\varphi$ in mathematica's built-in function SphericalHarmonicY? The different angular correspondence is important for me to calculate the triple integral later.

$\endgroup$
3
  • 1
    $\begingroup$ Should't the convention used in be obvious just by evaluating (for example) SphericalHarmonicY[1, 1, \[Theta], \[Phi]] $\endgroup$ Commented Feb 22, 2023 at 13:11
  • $\begingroup$ The range I wrote may cause some misunderstanding. It is actually used in spherical coordinates and is useful for me to calculate triple integrals. However, the variable values in SphericalHarmonicY can be filled in at will, such as SphericalHarmonicY[1, 0, 10000, 10000]//N. $\endgroup$ Commented Feb 22, 2023 at 13:16
  • 2
    $\begingroup$ From SphericalHarmonicY[1, 1, \[Theta], \[Phi]]= -(1/2) E^(I \[Phi]) Sqrt[3/(2 \[Pi])] Sin[\[Theta]] it is clear that your first definition is used. $\endgroup$ Commented Feb 22, 2023 at 13:19

2 Answers 2

3
$\begingroup$

Wolfram Language uses the physics convention, like in your figure 1.

Weisstein, Eric W. "Spherical Harmonic." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/SphericalHarmonic.html

enter image description here

In this entry, theta is taken as the polar (colatitudinal) coordinate with theta in $\theta \in [0,\pi]$, and $\phi$ as the azimuthal (longitudinal) coordinate with $phi \in [0,2\pi)$. This is the convention normally used in physics, as described by Arfken (1985) and the Wolfram Language [...] Spherical harmonics are implemented in the Wolfram Language as SphericalHarmonicY[l, m, theta, phi].

enter image description here

From Wikipedia:

Spherical coordinates $(r, θ, φ)$ as commonly used in physics (ISO 80000-2:2019 convention): radial distance r (distance to origin), polar angle $θ$ (theta) (angle with respect to polar axis), and azimuthal angle φ (phi) (angle of rotation from the initial meridian plane).

For example, you may recognize the phase $\exp\left(i \, \phi\right)$ factor corresponding to the longitudinal coordinate and the $\sin(\theta)$ factor corresponding to the latitude by evaluating SphericalHarmonicY[1,1, θ, ϕ].

enter image description here

Which should confirm the statements before.

$\endgroup$
2
$\begingroup$

As you can see at reference page, https://reference.wolfram.com/language/ref/SphericalHarmonicY.html

SphericalHarmonicY[l, m, \[Theta], \[Phi]] 

Returns $Y_l^m(\theta,\phi)$

For example, If you evaluate

SphericalHarmonicY[3, 1, \[Theta], \[Phi]] 

, You will obtain $$-\frac{1}{8}e^{i\phi}\sqrt{\frac{21}{\pi}}(1+5\cos^2\theta)\sin\theta$$

And this result clearly means your first definition of spherical coordinate has been used.

$\endgroup$
1
  • 3
    $\begingroup$ Can you explain " this result clearly means your first definition of spherical coordinate has been used." ? That clearly may not be as clear for all. $\endgroup$ Commented Feb 22, 2023 at 14:13

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.