Hydrogen Atom Radial Functions

Manipulate[
If[L≥n,L=n-1];
label=Which[L==0,Style["s",Italic],L==1,Style["p",Italic],L==2,Style["d",Italic],L==3,Style["f",Italic]];
p1=Quiet[Plot[r^2 R[n,L,r]^2,{r,0,rmax[[n]]},PlotRange->{{0,rmax[[n]]},{0,yrange[[n]]}},Filling->Axis,Ticks->ticksmat[[n,1]],TicksStyle->Directive[16,Gray],PlotStyle->Thick,PlotLabel->Style[Row[{NumberForm[n,1],label}],18,Darker[Blue]],AxesLabel->label1]];
av=Graphics[{Thick,Dashed,Blue,Line[{{rav[n,L],0},{rav[n,L],yrange[[n]]}}],
Text[Style[Row[{"⟨",Style["r",Italic],"\!\(\*SubscriptBox[\(⟩\), \(n, \\ l\)]\)"}],18],{1.48 rav[n,L], .8 yrange[[n]] }]}];

Pane[
If[L<n,GraphicsRow[{Show[p1,av],
Plot[ R[n,L,r],{r,0,rmax[[n]]},PlotRange->All,Ticks->ticksmat[[n,2]],TicksStyle->Directive[16,Gray],PlotStyle->Thick,AxesLabel->label2]},ImageSize->{600,300}],

],
ImageSize->{600,300}
],

{{n,1,"quantum numbers  n"},Range[4]},
{{L,0,Style["l",Italic]},Range[0,n-1]},

ControlType->SetterBar,TrackedSymbols:>{n,L},

Initialization:>(F[n_,L_,x_]:=(x^L) (E^(-x/2)) Factorial[n+L] LaguerreL[n-L-1,2 L+1,x];
R[n_,L_,r_]:=a^(-3/2) 2/(n^2) (Sqrt[((Factorial[n-1-L])/((Factorial[n+L])^3))]) F[n,L,2 r/(n a)];
rav[np_,Lp_]:=np^2 (1.+0.5 (1.-Lp (Lp+1.)/(np^2)));

a=1; (*plots in units of Bohr radius*)
rmax={5,15,30,50,70};yrange={.55,.2,.12,.07};
ticksmat=ConstantArray[0.,{5,2}];
ticksmat[[1,1]]={{0,2,4},{0.25,0.5}};
ticksmat[[1,2]]={{0,2,4},Automatic};
ticksmat[[2,1]]={{0,6,12},{.05,.15}};
ticksmat[[2,2]]={{0,6,12},Automatic};
ticksmat[[3,1]]={{0,10,20},{.05,.1}};
ticksmat[[3,2]]={{0,10,20},Automatic};
ticksmat[[4,1]]={{0,20,40},{.03,.06}};
ticksmat[[4,2]]={{0,20,40},Automatic};
label1={Text[Style[Row[{Style["r",Italic]," / ",(Subscript[Style["a",Italic], 0])}],18]],
Text[Style[Row[{((Style["r",Italic])^2)," ",(Subscript[Style["R",Italic], Row[{Style["n",Italic],", ",Style["l",Italic]}]]),"(",Style["r",Italic],((")")^2)}],18]]};
label2={Text[Style[Row[{Style["r",Italic]," / ",(Subscript[Style["a",Italic], 0])}],18]],
Text[Style[Row[{(Subscript[Style["R",Italic], Row[{Style["n",Italic],", ",Style["l",Italic]}]]),"(",Style["r",Italic],")"}],18]]})]

The eigenfunctions in spherical coordinates for the hydrogen atom are (Subscript[ϕ, n,ℓ.m])(r,θ,φ)=(Subscript[R, n,ℓ])(r)(Subscript[Y, ℓ]^m)(θ,φ), where (Subscript[R, n,ℓ])(r) and (Subscript[Y, ℓ]^m)(θ,φ) are the solutions to the radial and angular parts of the Schrödinger equation, respectively, and n, ℓ, and m are the principal, orbital, and magnetic quantum numbers with allowed values  n=0,1,2,…,n-1, ℓ=0,1,2,…,n-1, and m=0,±1,±2,…,±ℓ. The (Subscript[Y, ℓ]^m)(θ,φ) are the spherical harmonics and the radial functions are (Subscript[R, n,ℓ])(r)=(Sqrt[(((n-1-ℓ)!)/(2 ((n [(n+ℓ)!])^3)))])((((2/(n (Subscript[a, 0])))))^(ℓ+3/2))(r^ℓ)(e^(-r/n (Subscript[a, 0])))(Subscript[L, n+ℓ]^(2 ℓ+1))(2 r/n (Subscript[a, 0])), where (Subscript[L, p]^a)(x) is the (p^th)-order associated Laguerre polynomial and (Subscript[a, 0]) is the Bohr radius. The left graphic shows the radial probability density (r^2)|(Subscript[R, n,ℓ])(r)((|)^2) and the expectation value (Subscript[⟨r⟩, n,ℓ])≡⟨(Subscript[ϕ, n,ℓ.m])|r|(Subscript[ϕ, n,ℓ.m])⟩=(n^2)(Subscript[a, 0])[1+(1/2)(1-((ℓ(ℓ+1))/(n^2)))], and the right graphic shows the radial function.

Contributed by: Porscha McRobbie and Eitan Geva