Variational Principle: Harmonic Oscillator

Ground State

1. Trial Wave Functions

ψ[x_,α_]:= Exp[-α x^2]

Plot[ψ[x,1],{x,-5,5}, PlotRange->All]

Norm

Integrate[ψ[x,α]ψ[x,α],{x,-Infinity,Infinity},Assumptions->α>0]

Normalized Trial Wave Functions

ψ[x_,α_]:= Exp[-α x^2]/Sqrt[((Sqrt[(π/2)])/(Sqrt[α]))]

2. <H>(α)

D[ψ[x,α],{x,2}]

H[x_,ϕ_]:=-ℏ^2/(2 m)D[ϕ,{x,2}]+1/2 m ω^2 x^2 ϕ

H[x,ψ[x,α]]

<H>(α)

Integrate[ψ[x,α]H[x,ψ[x,α]],{x,-Infinity, Infinity},Assumptions->α>0]

H1[α_]:=((m (ω^2))/(8 α))+((α (ℏ^2))/(2 m))

3. Minimization

Plot[H1[α]/.{m->1,ℏ->1,ω->1},{α,0,5}]

Solve[x^2==-1,x]

Solve[D[H1[α],α]==0,α]

Ground State Energy

H1[((m ω)/(2 ℏ))]

Ground State

ψ[x,((m ω)/(2 ℏ))]

First Excited State (?)

1.

γ[x_,α_]:=x Exp[-α x^2]

Plot[γ[x,5],{x,-5,5},PlotRange->All]

Normalized trial wave Functions

Integrate[γ[x,α]γ[x,α],{x,-Infinity,Infinity},Assumptions->α>0]

γ[x_,α_]:=x Exp[-α x^2]/Sqrt[((Sqrt[(π/2)])/(4 (α^(3/2))))]

2.

Integrate[γ[x,α]H[x,γ[x,α]],{x,-Infinity, Infinity},Assumptions->α>0]

H2[α_]:=((3 m (ω^2))/(8 α))+((3 α (ℏ^2))/(2 m))

3.

Solve[D[H2[α],α]==0,α]

First Excited State Energy

H2[((m ω)/(2 ℏ))]

First  Excited  State

γ[x,((m ω)/(2 ℏ))]

“Arbitrary” State

1.

κ[x_,α_]:=1/(x^2+α)

Integrate[κ[x,α]κ[x,α],{x,-Infinity,Infinity},Assumptions->α>0]

κ[x_,α_]:=1/(x^2+α)/Sqrt[(π/(2 (α^(3/2))))]

Plot[κ[x,5],{x,-5,5}]

2.

Integrate[κ[x,α]H[x,κ[x,α]],{x,-Infinity, Infinity},Assumptions->α>0]

H3[α_]:=(1/2) m α (ω^2)+((ℏ^2)/(4 m α))

3.

Solve[D[H3[α],α]==0,α]

Ground State Energy

H3[(ℏ/((Sqrt[2]) m ω))]

(((ω ℏ)/(Sqrt[2]))-((ω ℏ)/2))/(ω ℏ)//FullSimplify//N

Ground State

Plot[Evaluate@({κ[x,(ℏ/((Sqrt[2]) m ω))],ψ[x,((m ω)/(2 ℏ))]}/.{m->1,ℏ->1,ω->1}),{x,-5,5}]

Observables

<X^2>

Integrate[ψ[x,((m ω)/(2 ℏ))]x^2 ψ[x,((m ω)/(2 ℏ))],{x,-Infinity, Infinity},Assumptions->((m ω)/ℏ)>0]

Integrate[κ[x,(ℏ/((Sqrt[2]) m ω))]x^2 κ[x,(ℏ/((Sqrt[2]) m ω))],{x,-Infinity, Infinity},Assumptions->((Sqrt[ℏ])/((Sqrt[m]) (Sqrt[ω])))>0]

((ℏ/((Sqrt[2]) m ω))-(ℏ/(2 m ω)))/((ℏ/(2 m ω)))//FullSimplify//N

< X^4 >

Integrate[ψ[x,((m ω)/(2 ℏ))]x^4 ψ[x,((m ω)/(2 ℏ))],{x,-Infinity, Infinity},Assumptions->((m ω)/ℏ)>0]

Integrate[κ[x,(ℏ/((Sqrt[2]) m ω))]x^4 κ[x,(ℏ/((Sqrt[2]) m ω))],{x,-Infinity, Infinity},Assumptions->((Sqrt[ℏ])/((Sqrt[m]) (Sqrt[ω])))>0]