"Hydrogen radius" psi(n,l,m) = R(n,l) Y(l,m) R(n,l) = 2 / n^2 * a0^(-3/2) * sqrt((n - l - 1)! / (n + l)!) * (2 r / (n a0))^l * L(2 r / (n a0), n - l - 1, 2 l + 1) * exp(-r / (n a0)) -- associated Laguerre polynomial (k is a local var) L(x,n,m,k) = (n + m)! sum(k,0,n, (-x)^k / ((n - k)! (m + k)! k!)) -- spherical harmonic Y(l,m) = (-1)^m sqrt((2 l + 1) / (4 pi) (l - m)! / (l + m)!) * P(l,m) exp(i m phi) -- associated Legendre of cos theta (arxiv.org/abs/1805.12125) P(l,m,k) = test(m < 0, (-1)^m (l + m)! / (l - m)! P(l,-m), (sin(theta)/2)^m sum(k, 0, l - m, (-1)^k (l + m + k)! / (l - m - k)! / (m + k)! / k! * ((1 - cos(theta)) / 2)^k)) "Verify equation (1)" for(n, 1, 3, for(l, 0, n - 1, for(m, -l, l, a = psi(n,l,m), y = conj(a) a r^2 sin(theta), f = defint(expform(y), theta, 0, pi, phi, 0, 2 pi), I = integral(r f, r), rbar = 0 - eval(I,r,0), check(rbar == (3 n^2 - l (l + 1)) / 2 a0) ))) "ok"
Run