0
$\begingroup$

I want to write these two Expressions in terms of spin-weighted spherical harmonics:

$\cos^{2}\theta\,\cos^{2}\phi - \sin^{2}\phi$

$\cos^{2}\theta\,\sin^{2}\phi - \cos^{2}\phi$

I've written this code to calculate them:

ClearAll["Global`*"]; (*Define the function of theta,phi*) f[theta_, phi_] := Sin[phi]^2 - Cos[theta]^2 Cos[phi]^2; (*We will project up to some maximum ell,say ell=2 for illustration*) lmax = 2; (*The coefficient a_{l,m} is the integral of f times the conjugate \ Y_{l}^m, integrated over all solid angle (theta from 0 to Pi,phi from \ 0 to 2Pi).*) coeff[l_, m_] := Integrate[ Conjugate[SphericalHarmonicY[l, m, theta, phi]] f[theta, phi] Sin[ theta], {theta, 0, Pi}, {phi, 0, 2 Pi}]; (*Build up the spherical-harmonic expansion by summing a_{l,m} \ Y_{l}^m.*) fExpanded = Sum[coeff[l, m] (SphericalHarmonicY[l, m, theta, phi] // TraditionalForm), {l, 0, lmax}, {m, -l, l}] // FullSimplify; fExpanded // FullSimplify 

I have used chatGPT o1 and Deepseek and also tried to calculate them manually using Table of spherical harmonics, and TAB.1 HERE, but neither of them works.

Is it even possible to do this?

I'd appreciate any help.

Edit:

note that, it's possible to use Real and Imaginary parts of $Y_{lm}$'s separately.

For example: $\sin^{2}{\theta}\cos{2\phi} \propto \Re[Y_{22}]$ and $\sin^{2}{\theta}\sin{2\phi} \propto \Im[Y_{22}]$

$\Big($as we know: $Y_{22} \propto \sin^{2}{\theta} \exp({2i\phi}) \Big)$

New Edit: New code with spin-weighted spherical harmonics:

ClearAll["Global`*"]; f[\[Theta]_, \[Phi]_] := Sin[\[Phi]]^2 - Cos[\[Theta]]^2 Cos[\[Phi]]^2; smax = 2; lmax = 2; coeff[s_, l_, m_] := Integrate[ Conjugate[ SpinWeightedSphericalHarmonicY[s, l, m, \[Theta], \[Phi]]] f[\[Theta], \[Phi]] Sin[\[Theta]], {\ \[Theta], 0, Pi}, {\[Phi], 0, 2 Pi}]; fExpanded = Sum[coeff[s, l, m] (SpinWeightedSphericalHarmonicY[s, l, m, \[Theta], \[Phi]]), {s, 0, smax}, {l, s, lmax}, {m, -l, l}]; fExpanded // FullSimplify 
$\endgroup$
5
  • 1
    $\begingroup$ In your sample code, it looks to me like you're using the standard spherical harmonics, not the spin-weighted ones. Spherical harmonics are a basis for square-integrable functions on the sphere, and they are a subset of the spin-weighted ones, so you can expand such a function in spin-weighted Y's. You might need an infinite number of terms, though. Your code seems fine for just using the spherical harmonics. $\endgroup$ Commented Feb 26 at 21:29
  • $\begingroup$ @march. Thank you. You're quite right, what I want to know is that if this is theoretically possible, and, of course, how to do it! It's ok if it has infinite terms. $\endgroup$ Commented Feb 27 at 4:52
  • $\begingroup$ @march I added a new code with spin-weighted spherical harmonics, pls have a look. $\endgroup$ Commented Feb 27 at 17:45
  • 1
    $\begingroup$ Asking if it's "theoretically possible" seems like a math question. Are you asking if you can get the entire expansion of an arbitrary function in terms of the spin-weighted functions? This expansion usually requires an infinite number of terms, so of course you can't do that computationally. If you're asking how to code the $_sY_{lm}$'s, then just do it: there are formulas for them; they're not built into Mathematica. If you're asking if it can be done at all, that sounds like a math question and so belongs on Mathematics. Can you clarify what you're asking here? $\endgroup$ Commented Feb 27 at 18:09
  • $\begingroup$ @march Thank you. All I want is to find those expressions in terms of spin-weighted spherical harmonics. The codes and the links show my attempts and the ways I've tried to achieve that. However, since I couldn't do it, I wondered if that was even achievable or not. It seems the answer is YES, so my next question is "HOW?". In addition, in those two examples I've made, there was no need to use series; It's just one term. look at Y_{22} here. $\endgroup$ Commented Feb 27 at 18:51

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.