Harmonic Oscillator

Solutions to the harmonic oscillator (quadratic potential).

Energy Eigenstates

We start by giving the solutions go the Schrödinger Equation with potential V(x)=(1/2)((Subscript[ω, 0])^2)(x^2) in terms of the energy and length scales (Subscript[Δ, E])=ℏ (Subscript[ω, 0]) and a=(Sqrt[ℏ /m (Subscript[ω, 0])]).

$Assumptions={a>0,ℏ>0,ω>0,(Subscript[ω, 0])>0,Element[{ℏ,a,ω,(Subscript[ω, 0]),x,t},Reals]}
NormHO[n_]:=1/Sqrt[π a (2^n) n!]
Ψ[n_,ϕ_]:=NormHO[n]Exp[I (ϕ - ω t)] HermiteH[n,x/a]Exp[-(((x/a))^2)/2]/.ω->(Subscript[ω, 0])(n+1/2)

PsiPlot=Ψ[m,0] /. {(Subscript[ω, 0])->2π,a->1};
Manipulate[GraphicsColumn[{Plot[Evaluate[{Abs[PsiPlot],Re[PsiPlot],Im[PsiPlot]} /. {m->mm,t->tNow}],{x,-6,6},PlotRange->{-0.6,0.6},Filling->Axis],Plot[{Abs[PsiPlot]^2} /. {m->mm,t->tNow},{x,-6,6},PlotRange->{0,0.4},Filling->Bottom]}],{{mm,0,"Eigenstate"},0,10,1,Appearance->"Labeled"},{{tNow,0,"time"},0,2,0.02,Appearance->"Labeled"}]

PsiPlot2=(Ψ[0,0]+Ψ[1,0])/(Sqrt[2]) /. {(Subscript[ω, 0])->2π,a->1};
Manipulate[GraphicsColumn[{Plot[Evaluate[{Abs[PsiPlot2],Re[PsiPlot2],Im[PsiPlot2]} /. {t->tNow}],{x,-3,3},PlotRange->0.65{-1,1},Filling->Axis],Plot[{Abs[PsiPlot2]^2} /. {t->tNow},{x,-3,3},PlotRange->{0,0.4},Filling->Bottom]}],{{tNow,0,"time"},0,2,0.01,Appearance->"Labeled"}]

This is the solution given in the bonus problem... something that looks like a classical harmonic oscillator.

Cn[n_]:=1/Sqrt[(2^n) n!] ((((Subscript[x, 0])/a))^n) Exp[-((((Subscript[x, 0])/a))^2)/4]
PsiPlot3=Sum[Cn[n]Ψ[n,0],{n,0,m}]/. {(Subscript[ω, 0])->2π,a->1,m->10};
Manipulate[GraphicsColumn[{Plot[Evaluate[{Abs[PsiPlot3],Re[PsiPlot3],Im[PsiPlot3]} /. {(Subscript[x, 0])->x0,t->tNow}],{x,-6,6},PlotRange->0.65{-1,1},Filling->Axis],Plot[{Abs[PsiPlot3]^2} /. {(Subscript[x, 0])->x0,t->tNow},{x,-6,6},PlotRange->{0,0.4},Filling->Bottom]}],{{x0,0,"initial position"},-5,5,0.1,Appearance->"Labeled"},{{tNow,0,"time"},0,2,0.01,Appearance->"Labeled"}]

Notice that for values of (Subscript[x, 0])≳3, our use of only the first 11 states is not sufficient.  You can see this be looking at the sum of the squares of the terms, and noticing that it differes significantly from 1.

N[Sum[Cn[n]^2/. {(Subscript[ω, 0])->2π,a->1,(Subscript[x, 0])->1},{n,0,10}]]
N[Sum[Cn[n]^2/. {(Subscript[ω, 0])->2π,a->1,(Subscript[x, 0])->3},{n,0,10}]]
N[Sum[Cn[n]^2/. {(Subscript[ω, 0])->2π,a->1,(Subscript[x, 0])->5},{n,0,10}]]