The expansion of \(\frac{1}{r_{ij}}\) enables the Hartree equations to be solved analytically. Consider two electrons \(q_i\) and \(q_j\) as depicted in the diagram below:

According to the law of cosines \(\vert\boldsymbol{r}_i-\boldsymbol{r}_j\vert^2=r_i^2+r_j^2-2r_ir_jcos\gamma\), which is equal to \(r_i^2\left[1+\left(\frac{r_j}{r_i}\right)^2-2\left(\frac{r_j}{r_i}\right)cos\gamma\right]\) or
$$\frac{1}{\vert\boldsymbol{r}_i-\boldsymbol{r}_j\vert}=\frac{1}{r_{ij}}=\frac{1}{r_i}(1+\lambda)^{-1/2}\;\;\;\;\;\;\;\;(35)$$
where \(\lambda=\left(\frac{r_j}{r_i}\right)\left(\frac{r_j}{r_i}-2cos\gamma\right)\).
Due to inter-electronic repulsion, \(r_i\gg r_j\) if \(\gamma\) is acute and hence \(\lambda\ll 1\), which implies that we can express eq35 as a binomial series, where \(\frac{1}{r_{ij}}=\frac{1}{r_i}\left(1-\frac{1}{2}\lambda+\frac{3}{8}\lambda^2-\frac{5}{16}\lambda^3+\cdots\right)\) . Substituting \(\lambda=\left(\frac{r_j}{r_i}\right)\left(\frac{r_j}{r_i}-2cos\gamma\right)\) in the series, rearranging and displaying the terms of up to \(\left(\frac{r_j}{r_i}\right)^3\) yields
$$\frac{1}{r_{ij}}=\frac{1}{r_i}\left[1+cos\gamma\frac{r_j}{r_i}+\frac{1}{2}(3cos^2\gamma-1)\left(\frac{r_j}{r_i}\right)^2+\frac{1}{2}(5cos^3\gamma-3cos\gamma)\left(\frac{r_j}{r_i}\right)^3+\cdots\right]$$
Since the coefficients of the powers of \(\frac{r_j}{r_i}\) are the Legendre polynomials \(P_n(cos\gamma)\), and that \(r_i\gg r_j\), we have
$$\frac{1}{r_{ij}}=\frac{1}{r_>}\sum_{n=0}^{\infty}\left(\frac{r_<}{r_>}\right)^nP_n(cos\gamma)\;\;\;\;\;\;\;\;(36)$$
As mentioned in the previous article, \(cos\gamma\) is dependent on \(\theta_i\), \(\theta_j\), \(\phi_i\) and \(\phi_j\) (see diagram below). This implies that a function of \(cos\gamma\) like \(P_n(cos\gamma)\) is a function of four angles. If we rotate the z-axis such that it lies on \(\boldsymbol{r}_j\) , the vectors are expressed in a new coordinate system, where the new polar angle and azimuthal angle are \(\gamma\) and \(\beta\) respectively. Consequently, we have \(P_n(cos\gamma)=f(\gamma,\beta)\), which is a simpler function to work with. We can also simplify the function in the original coordinate system by holding \(\theta_j\) and \(\phi_j\) as constants, resulting in a function of the variables \(\theta_i\) and \(\phi_i\), or \(P_n(cos\gamma)=f(\theta_i,\phi_i)\).


With reference to the new coordinate system, \(P_n(cos\gamma)=f(\gamma,\beta)\) and its complex conjugate are eigenfunctions of \(\hat{L}^2=-\hbar^2\left[\frac{1}{sin^2\gamma}\frac{\partial^2}{\partial\beta^2}+\frac{1}{sin\gamma}\frac{\partial}{\partial\gamma}\left(sin\gamma\frac{\partial}{\partial\gamma}\right)\right]\) with eigenvalue \(l(l+1)\hbar^2\). For the original coordinate system, \(P_n(cos\gamma)=f(\theta_i,\phi_i)\), and its complex conjugate are eigenfunctions of \(\hat{L}^2=-\hbar^2\left[\frac{1}{sin^2\theta_i}\frac{\partial^2}{\partial\phi_i^2}+\frac{1}{sin\theta_i}\frac{\partial}{\partial\theta_i}\left(sin\theta_i\frac{\partial}{\partial\theta_i}\right)\right]\) with the same eigenvalue \(l(l+1)\hbar^2\).

Question
Show that the eigenvalue of \(\hat{L}^2\) is \(l(l+1)\hbar^2\) in any three-dimensional coordinate system.
Answer
From eq108 and eq109, the quantum orbital angular momentum ladder operators for the original and new coordinate systems are \(\hat{L}_{\pm}=\hat{L}_x\pm i\hat{L}_y\) and \(\hat{L}_{\pm}^{\prime}=\hat{L}_{x^{\prime}}\pm i\hat{L}_{y^{\prime}}\) respectively. The corresponding eigenfunctions of \(\hat{L}_{\pm}\) and \(\hat{L}_{\pm}^{\prime}\) are \(Y\) and \(Y^{\prime}\) respectively. Following the steps of determining the eigenvalues of \(\hat{L}^2\) and \(\hat{L}^{2^{\prime}}\), we have \(\hat{L}^2Y=l(l+1)\hbar^2Y\) and \(\hat{L}^{2^{\prime}}Y^{\prime}=l(l+1)\hbar^2Y^{\prime}\) respectively.
Furthermore, the general solution of the eigenfunction of \(\hat{L}^2=-\hbar^2\left[\frac{1}{sin^2\theta_i}\frac{\partial^2}{\partial\phi_i^2}+\frac{1}{sin\theta_i}\frac{\partial}{\partial\theta_i}\left(sin\theta_i\frac{\partial}{\partial\theta_i}\right)\right]\) is \(\sum_{m=-n}^nA_{nm}P_n^{\vert m\vert}(cos\theta_i)e^{i\vert m\vert\phi_i}\), where \(P_n^{\vert m\vert}(cos\theta_i)\) are the associated Legendre polynomials and \(A_{nm}\) are the coefficients of the basis polynomials in the linear combination. Therefore,
$$P_n(cos\gamma)=\sum_{m=-n}^nA_{nm}P_n^{\vert m\vert}(cos\theta_i)e^{i\vert m\vert\phi_i}\;\;\;\;\;\;\;\;(37)$$

Question
Why is \(P_n(cos\gamma)=\sum_{m=-n}^nA_{nm}P_n^{\vert m\vert}(cos\theta_i)e^{i\vert m\vert\phi_i}\)?
Answer
For a particular value of \(n\), the linear combination is a sum of basis functions of a particular quantum angular momentum value \(l\). For example, when \(n=1\), we have a linear combination of the hydrogenic \(p\)-orbital wavefunctions. Therefore, the eigenvalues of each term of the sum is always degenerate, which ensures that \(P_n(cos\gamma)\) is an eigenfunction of \(\hat{L}^2\).
To solve for \(A_{nm}\), we multiply both sides of eq37 by the eigenfunction \(P_n^{\vert m^{\prime}\vert}(cos\theta_i)e^{-i\vert m^{\prime}\vert\phi_i}\) and integrate over all space:
\(\int P_n^{\vert m^{\prime}\vert}(cos\theta_i)e^{-i\vert m^{\prime}\vert\phi_i}P_n(cos\gamma)d\tau\) \(=\int\sum_{m=-n}^nA_{nm} P_n^{\vert m^{\prime}\vert}(cos\theta_i)e^{-i\vert m^{\prime}\vert\phi_i}P_n^{\vert m\vert}(cos\theta_i)e^{i\vert m\vert\phi_i}d\tau\)
Due to the orthogonal property of associated Legendre polynomials, only the \(m=m^{\prime}\) term in the RHS expansion of the above equation survives,
\(\int P_n^{\vert m^{\prime}\vert}(cos\theta_i)e^{-i\vert m^{\prime}\vert\phi_i}P_n(cos\gamma)d\tau\) \(=2\pi A_{nm}\int_{-1}^1 P_n^{\vert m\vert}(cos\theta_i)P_n^{\vert m\vert}(cos\theta_i)d(cos\theta_i)\)
From eq390, \(\int_{-1}^1 \vert P_n^{\vert m\vert}(x)\vert^2dx=\frac{(n+\vert m\vert)!}{(n-\vert m\vert)!}\frac{2}{2n+1}\). Substituting this equation in the above equation and rearranging gives
\(A_{nm}=\frac{2n+1}{4\pi}\frac{(n-\vert m\vert)!}{(n+\vert m\vert)!}\int P_n^{\vert m\vert}(cos\theta_i)e^{-i\vert m\vert\phi_i}P_n(cos\gamma)d\tau\;\;\;\;\;\;\;\;(38)\)
To evaluate the integral in eq38, we expand the eigenfunction \(P_n^{\vert m\vert}(cos\theta_i)e^{-i\vert m\vert\phi_i}\) as a linear combination of basis functions in the new coordinate system:
$$P_n^{\vert m\vert}(cos\theta_i)e^{-i\vert m\vert\phi_i}=\sum_{k=-n}^nB_{nk}P_n^{\vert k\vert}(cos\gamma)e^{i\vert k\vert\beta}\;\;\;\;\;\;\;\;(39)$$

Question
Why can we express \(P_n^{\vert m\vert}(cos\theta_i)e^{-i\vert m\vert\phi_i}\) in the original coordinate system as a linear combination of basis functions in the new coordinate system?
Answer
As mentioned earlier in the article, \(\hat{L}^2\) and \(\hat{L}^{2^{\prime}}\) share the same set of eigenvalues. For a particular value of \(n\), \(P_n^{\vert m\vert}(cos\theta_i)e^{-i\vert m\vert\phi_i}\) is an eigenfunction of \(\hat{L}^2\) with a specific eigenvalue of \(l(l+1)\hbar^2\), which is the same eigenvalue associated with \(\sum_{k=-n}^nB_{nk}P_n^{\vert k\vert}(cos\gamma)e^{i\vert k\vert\beta}\) for the same value of \(n\). In other words, \(\hat{L}^2Y^{\prime}=\hat{L}^2\sum_iY_i=l(l+1)\hbar^2\sum_iY_i=\hat{L}^{2^{\prime}}Y^{\prime}\), which implies that \(\hat{L}^2\) is invariant with respect to rotation of the coordinate system.
To solve for \(B_{nk}\), multiply both sides of eq39 by \(P_n^{\vert k^{\prime}\vert}(cos\gamma)e^{-i\vert k^{\prime}\vert\beta}\) , integrate over all space and repeat the steps in evaluating \(A_{nm}\). We have
$$B_{nk}=\frac{2n+1}{4\pi}\frac{(n-\vert k\vert)!}{(n+\vert k\vert)!}\int P_n^{\vert k\vert}(cos\gamma)e^{-i\vert k\vert\beta}P_n^{\vert m\vert}(cos\theta_i)e^{-i\vert m\vert\phi_i}d\tau\;\;\;\;\;\;\;\;(40)$$
Next, eq39 must hold for the case of \(\gamma=0\), with \(\theta_i=\theta_j\) and \(\phi_i=\phi_j\). Expanding eq39,
\(P_n^{\vert m\vert}(cos\theta_j)e^{-i\vert m\vert\phi_j}=B_{n(-n)}P_n^{\vert -n\vert}(1)e^{i\vert -n\vert\beta}\)\(+B_{n(-n+1)}P_n^{\vert -n+1\vert}(1)e^{i\vert -n+1\vert\beta}+\cdots+B_{n(n)}P_n^{\vert n\vert}(1)e^{i\vert n\vert\beta}\;\;\;\;\;\;\;\;(41)\)
From eq363a, \(P_n^{\vert k\vert}(cos0)=(1-cos^20)^{\frac{\vert k\vert}{2}}\frac{d^{\vert k\vert}}{dcos\gamma^{\vert k\vert}}p_n(cos0)\), which is equal to zero if \(k\neq 0\) and is equal to one if \(k=0\) (because \(P_n^0(1)=P_n(1)=1\)), i.e.
$$P_n^{\vert k\vert}(1)=\left\{\begin{matrix} 0 &k\neq 0 \\ 1 &k=0 \end{matrix}\right.\;\;\;\;\;\;\;\;(42)$$
So the only term that survives in eq41 is \(B_{n(0)}P_n^{\vert 0\vert}(1)e^{i\vert 0\vert\beta}=B_{n(0)}P_n^{\vert 0\vert}(1)\) and eq41 becomes
$$P_n^{\vert m\vert}(cos\theta_j)e^{-i\vert m\vert\phi_j}=B_{n(0)}\;\;\;\;\;\;\;\;(43)$$
Substitute eq40, where \(k=0\) and noting that \(P_n^{\vert 0\vert}(cos\gamma)=P_n(cos\gamma)\), in eq43,
$$P_n^{\vert m\vert}(cos\theta_j)e^{-i\vert m\vert\phi_j}=\frac{2n+1}{4\pi}\int P_n(cos\gamma)P_n^{\vert m\vert}(cos\theta_i)e^{-i\vert m\vert\phi_i}d\tau\;\;\;\;\;\;\;\;(44)$$
Substitute eq44 in eq38
$$A_{nm}=\frac{(n-\vert m\vert)!}{(n+\vert m\vert)!}P_n^{\vert m\vert}(cos\theta_j)e^{-i\vert m\vert\phi_j}\;\;\;\;\;\;\;\;(45)$$
Combining eq45, eq37 and eq36
$$\frac{1}{r_{ij}}=\sum_{n=0}^{\infty}\sum_{m=-n}^n\frac{(n-\vert m\vert)!}{(n+\vert m\vert)!}\frac{r_<\, ^n}{r_>^{\,n+1}}P_n^{\vert m\vert}(cos\theta_i)P_n^{\vert m\vert}(cos\theta_j)e^{i\vert m\vert(\phi_i-\phi_j)}\;\;\;\;\;\;\;\;(46)$$
Substitute \(Y_n^{\vert m\vert}(\theta_i,\phi_i)=\sqrt{\frac{2n+1}{4\pi}\frac{(n-\vert m\vert)!}{(n+\vert m\vert)!}}P_n^{\vert m\vert}(cos\theta_i)e^{i\vert m\vert\phi_i}\) in eq46, we have
$$\frac{1}{r_{ij}}=\sum_{n=0}^{\infty}\sum_{m=-n}^n\frac{4\pi}{2n+1}\frac{r_<\, ^n}{r_>^{\,n+1}}Y_n^{\vert m\vert}(\theta_i,\phi_i)\left[Y_n^{\vert m\vert}(\theta_j,\phi_j)\right]^*\;\;\;\;\;\;\;\;(47)$$