I would like to apply the differential operator
$- (\partial_\theta -\frac{i}{\sin (\theta)} \partial_\phi + s \cot (\theta))$
to a function $F$ (Spherical Harmonics), which is dependent on $\theta$ and $\phi$ like SphericalHarmonicY[l, m, θ, ϕ]
. How do I write this differential operator in Mathematica? The implementation should not depend on the particular function.
A non-working attempt I made is
(-Derivative[0, 0, 1, 0] + I/Sin[θ] Derivative[0, 0, 0, 1] + s Cot[θ])
SphericalHarmonicY[l, m, θ, ϕ]
But Mathematica didn't resolve the derivatives as stated in Derivative
. Is there an easy solution to this, that works like multiplication from the left?
This question seems to solve this by repeating f
after every differential. Is this really necessary? Mathematically, differential operators should not care about what comes after them, should they?
Edit
Just found this question about writing differential operators, but don't really understand it.
(-Derivative[0, 0, 1, 0][#] + I/Sin[\[Theta]] Derivative[0, 0, 0, 1][#] + s Cot[\[Theta]]) & [ SphericalHarmonicY[l, m, \[Theta], \[Phi]]]
$\endgroup$s Cot[\[Theta]]
was supposed to be multiplied by the argument. Just change to(-Derivative[0, 0, 1, 0][#] + I/Sin[\[Theta]] Derivative[0, 0, 0, 1][#] + s Cot[\[Theta]] #) &[ SphericalHarmonicY[l, m, \[Theta], \[Phi]]]
There is no0&
$\endgroup$