# Projection of a 3D spherical function to a carteasian axis

I have a 3D function defined in a spherical coordinate system $(r,\theta,\phi)$, which is written as a product of a radial function $R_{nl}(r)$ and a spherical harmonic $Y_{lm}(\theta,\phi)$ I.e $$\Psi_{nlm}(r,\theta,\phi) = R_{nl}(r)Y_{lm}(\theta,\phi).$$ Here $n,l$ and $m$ represent the quantum numbers and $\Psi_{nlm}(r,\theta,\phi)$ is a wavefunction, for some context and I only have numerical data for the radial functions. I want to plot the projection of the modulus squared of the wavefunction versus a specific carteasian axis. For example the projection in the z-axis can be defined as $$f(z) = \int\int dxdy~ |\Psi_{nlm}(r,\theta,\phi)|^2.$$ I've been told this is equivalent to writing $$f(z) = \int d\vec{r}~ \delta(\vec{r}\cdot\hat{k}-z)|\Psi_{nlm}(r,\theta,\phi)|^2$$ where $\vec{r}$ is the vector in spherical coordinates and $\hat{k}$ is the unit vector in the z direction. Is there a way to calculate this function of z (also for x and y) using one of the two equivalent forms, without knowing the analytic form of the radial function?

• You can't say "for example" because the $z$ axis plays a special role for the $Y_{lm}$. If you project onto the $z$ axis, the $\phi$ integration will yield $2\pi$ for $m=0$ and $0$ for $m\ne0$. Do you want to do this for all axes or is $z$ enough? – joriki Jul 13 '15 at 12:23
• @joriki I need to do it for all axes. I've found an example of the projection on this website. Thanks for pointing out that for the z axis, although that is just the $\phi$ integration, what would the function of $z$ be for $m=0$ – Free_Apples Jul 13 '15 at 12:46
• Sorry, I overlooked the squared magnitude -- in that case the $\phi$ integration yields $2\pi$ for all $m$. – joriki Jul 13 '15 at 13:19

I'll do it for the $z$ axis to give you the idea; it's also possible for the other axes, but a bit more complicated.

The $z$ axis case is simpler both because, as noted in the comments, the integration over $\phi$ yields $2\pi$, and because in this case we have simply $\vec r\cdot\hat k=r\cos\theta$. Thus after integrating over $\phi$, we're left with

$$f(z)=2\pi\int_0^\infty\mathrm drr^2\int_0^\pi\mathrm d\theta\sin\theta\,\delta(r\cos\theta-z)\left|R_{nl}(r)\right|^2\left|Y_{lm}(\theta,0)\right|^2\;.$$

Since you don't have $R$ in functional form (I guess you have samples?), we want to perform the integral over the delta distribution in $\theta$, not in $r$:

\begin{eqnarray} f(z)&=&2\pi\int_0^\infty\mathrm drr^2\int_{-1}^1\mathrm d\cos\theta\,\delta(r\cos\theta-z)\left|R_{nl}(r)\right|^2\left|Y_{lm}(\theta,0)\right|^2\\ &=&2\pi\int_0^\infty\mathrm drr^2\int_{-1}^1\mathrm d\cos\theta\frac1r\delta(\cos\theta-z/r)\left|R_{nl}(r)\right|^2\left|Y_{lm}(\theta,0)\right|^2\\ &=&2\pi\int_0^\infty\mathrm drr\left|R_{nl}(r)\right|^2\left|Y_{lm}(\arccos (z/r),0)\right|^2\;. \end{eqnarray}

This you can evaluate numerically using your numerical representation of $R_{nl}(r)$.

The principle applied here that you'll need for the other cases is

$$\delta(f(t)-z)=\sum_{f(t_i)=z}\frac{\delta\left(t-t_i\right)}{f'(t_i)}\;.$$

• Thank you, although I think you are missing an $r^2$ in first equation from the metric. I will try the other two cases myself, with the principles you introduced. – Free_Apples Jul 13 '15 at 23:40
• @Free_Apples: Sorry, thanks for catching that. Let me know if you run into trouble with the other two axes; I haven't tried it myself so don't know for sure how much more complicated it will get. – joriki Jul 14 '15 at 3:55
• Come to think of it, it may well be easier to re-express your spherical harmonics along the other axes and then apply this projection than to work out the other projections. The Wigner $D$ function that you need to rotate $Y_{lm}$ is worked out here: theoretical-physics.net/dev/math/wigner.html -- if I'm not mistaken, the only coefficients you'll need are the $d(j,m,m',\pi\,/\,2)$ given at the end of the first section. – joriki Jul 14 '15 at 4:08
• Thank you for the link to the Wigner D function, although I think it could be a bit over my head, but i'll give it a go. I've been trying to evaluate the f(z) function numerically for $l=1$, $m=-1$. In this case $|Y_{1-1}(arccos(z/r),0)|^2 = 3/8\pi(1-(z/r)^2)$, and the thinking about the projection onto the z axis it should be zero, however if i've done the integration correctly, I get a parabola. Is projection correct to produce the figure I linked in the previous comments? – Free_Apples Jul 14 '15 at 7:10
• @Free_Apples: I hadn't checked out that link. They don't do any projection; the text says that the plot shows the wave function (by the way, not the square of its magnitude) in the $xy$ plane. Also your expectation that the result should be $0$ for $Y_{1,-1}$ is correct for a plot in the $xy$ plane and wrong for the projection -- so it looks like you're not actually interested in the projection at all? At least one of us is confused here :-) – joriki Jul 14 '15 at 7:30