Eigenproblems
Find an eigenfunction for the finite square well eigenproblem
,
,
y(x)0, where
is a square well potential of height 5.
W[x_] := If[Abs[x] < 1, 0, 5];
Plot[W[x], {x, -5, 5}, Filling -> {1 -> 0}, PlotLabel -> W, ImageSize -> Medium]pfun = ParametricNDSolveValue[{-y''[x] + W[x]y[x] == λ y[x], y[0] == 1, y'[0] == 0}, y, {x, -50, 50}, {λ}];
Plot[Evaluate@Table[pfun[λ][x], {λ, 0, 5, 1}], {x, -2, 2}, ImageSize -> Medium]The true eigenfunctions satisfy
y(x)0. These can be approximated by finding functions
with
. Because the equation is symmetric in
, only solutions with
need to be found. Plot
for
:
Plot[pfun[λ][5], {λ, 0, 13}, ImageSize -> Medium]val = Map[FindRoot[pfun[λ][5], {λ, #}]&, {-2}]Show[Plot[Evaluate@Table[pfun[λ][x], {λ, 1, 3, .1}], {x, -6, 6}, PlotRange -> {-1, 1}, PlotStyle -> Lighter[Gray, .5]], Plot[Evaluate[pfun[λ][x] /. val], {x, -6, 6}, PlotStyle -> Thick], ImageSize -> Medium]