Problem 3, part d)

The equations from the postscript file:

eq1 = {1+r == A+B};
eq2 = {t == A + alpha B};
eq3 = {A-B == 1-r + q/k (1+r)};
eq4 = {t == A - alpha B + q/k t};
system = Join[eq1,eq2,eq3,eq4];

solution = Simplify[Solve[system,{A,B,r,t}]][[1]]

Put back the substitutions I made:

subs = {alpha -> Exp[-2I k a], q -> 2m U/(I h^2)};
solution = Simplify[solution /. subs]

Clear[t];
t = t /. solution;
t = t /. {E^(2I a k) -> Cos[2 k a] + I Sin[2 k a]};
tstar = t /. {2I -> -2I, I->-I};
trans = Simplify[t tstar]

e) Plot the transmission coefficient for a range of U values.

transsimp = trans /. {h->1,m->1,U->1,a->2};
Plot[transsimp,{k,.01,5}]

transsimp = trans /. {h->1,m->1,a->2};
transtable = Table[transsimp /. {U->x},{x,1,5,.5}];

ptable = Table[Plot[transtable[[i]],{k,.01,10}],{i,1,9}]

f) Plot the stationary states

tbig = transsimp /. U -> 20;
Plot[tbig,{k,0,Pi+.5}]

We see that for U large, the peaks in the transmission correpond to Pi/2, Pi, and so forth.  For the infinite well, the condition on energies for stationary states was
ka = n Pi, and since we have a->2 here, these peak resonances correspond to the
stationary states.

Clear[t];
resSubs = solution /. {h->1,m->1,a->2,U->10};
psi1[x_] := Cos[k x] + I Sin[k x] + r Cos[k x] - r I Sin[k x];
psi2[x_] := (A+B) Cos[k x] + I (A-B) Sin[k x];
psi3[x_] := t Cos[k x] + t I Sin[k x];

Clear[psi];
psi[x_] := (psi1[x] /. resSubs /. k->2 Pi) /; x <= 0
psi[x_] := (psi2[x] /. resSubs /. k->2 Pi) /; (x > 0) && (x <= 2)
psi[x_] := (psi3[x] /. resSubs /. k->2 Pi) /; x > 2

Plot the real and imaginary parts.

Plot[Re[psi[x]],{x,-1,3}]

Plot[Im[psi[x]],{x,-1,3}]

Clear[psi];
psi[x_] := (psi1[x] /. resSubs /. k->2 Pi+.3) /; x <= 0
psi[x_] := (psi2[x] /. resSubs /. k->2 Pi+.3) /; (x > 0) && (x <= 2)
psi[x_] := (psi3[x] /. resSubs /. k->2 Pi+.3) /; x > 2

Plot[Re[psi[x]],{x,-1,3}]
Plot[Im[psi[x]],{x,-1,3}]