Skip to main content

list manipulation - Function of Five Variables, and iterating over the last 3


I have defined a function:


Y[k_, q_, {r_, θ_, ϕ_}] := SphericalHarmonicY[k, q, θ, ϕ]/r^(k + 1)


I have a list of coordinates {r, θ, ϕ}. I would like to keep k and q fixed, and evaluate the function over the list, but I'm not quite sure how to accomplish this.



Answer



lst =  {{r1, r2, r3}, {θ1, θ2, θ3}, {ϕ1, ϕ2, ϕ3}}

Thread[Y[k, q, lst]]


{r1^(-1 - k) SphericalHarmonicY[k, q, θ1, ϕ1],
r2^(-1 - k) SphericalHarmonicY[k, q, θ2, ϕ2],
r3^(-1 - k) SphericalHarmonicY[k, q, θ3, ϕ3]}




Comments