Square Well Exercises

(1) Expectation value of position

Remove["Global`*"]

$Assumptions={a>0,n∈ Integers}

Write the normalized wave function

u[n_]=Sqrt[1/(2a)](Exp[I k x]-Exp[I k a]Exp[-I k x])/.k->n Pi/a;

Check that the answers look correct (after dividing out “i” for the even value of “n”)

u1=Simplify[ComplexExpand[u[1]]]

u2=Simplify[ComplexExpand[u[2]]]/I

Verify some things

Integrate[Conjugate[u1]u1,{x,-a/2,a/2}]==1

Integrate[Conjugate[u2]u2,{x,-a/2,a/2}]==1

Integrate[Conjugate[u2]u1,{x,-a/2,a/2}]==0

Show that the expectation values of “x” for either of these wave functions is zero

Integrate[Conjugate[u1]x u1,{x,-a/2,a/2}]==0

Integrate[Conjugate[u2]x u2,{x,-a/2,a/2}]==0

Calculate the expectation values of “x” for an equal-part superposition

u12=1/Sqrt[2](u1+ u2);
Integrate[Conjugate[u12]u12,{x,-a/2,a/2}]==1

Integrate[Conjugate[u12]x u12,{x,-a/2,a/2}]

(2) Finite square well

Remove["Global`*"]

$Assumptions={m>0,ℏ>0,Enrg>0,V0>0,a>0};

Set up the quantization condition equation

k=Sqrt[2 m Enrg/ℏ^2];
α=Sqrt[2 m (V0-Enrg)/ℏ^2];
subE=Enrg->ϵ V0;
subV= V0->g ℏ^2/(2m a^2);

lhs=Simplify[Tan[k a]/.subE/.subV]

rhs=Simplify[(2α k/(k^2-α^2))/.subE]

Look for solutions. First, do a shallow well

lhsShallow=(lhs)/.g->0.1;
Plot[{lhsShallow,rhs},{ϵ,0,1},
PlotStyle->{{Solid,Black},{Solid,Red}}]

FindRoot[lhsShallow-rhs,{ϵ,0.95}]

Now a deep well

lhsDeep=lhs/.g->10;
Plot[{lhsDeep,rhs},{ϵ,0,1},
PlotStyle->{{Solid,Black},{Solid,Red}}]

FindRoot[lhsDeep-rhs,{ϵ,0.4}]

Finally, a very deep well

lhsVDeep=lhs/.g->100;
Plot[{lhsVDeep,rhs},{ϵ,0,1},
PlotStyle->{{Solid,Black},{Solid,Red}}]

FindRoot[lhsVDeep-rhs,{ϵ,{0.1,0.4,0.95}}]