-- Draw radial probability density for hydrogen atom electron "x axis: radius (nanometers)" "y axis: probability density (1/nanometers)" "n: principal quantum number" 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)) L(x,n,m,k) = (n + m)! sum(k,0,n,(-x)^k / ((n - k)! (m + k)! k!)) a0 = 0.0529 -- Bohr radius in nanometers xrange = (0,2) yrange = (0,10) "n = 1" f = R(1,0)^2 r^2 draw(f,r) "n = 2" f = R(2,0)^2 r^2 draw(f,r) "n = 3" f = R(3,0)^2 r^2 draw(f,r)
Run