QM 1D energy eigenstates with variational solution
Author: R. Tobin

This interactive application integrates the time-independent Schrodinger equation. It also allows comparison between the actual solution and variational solutions.

You can select and adjust various potential energy functions, choose the symmetry of the desired solution, and adjust the energy of the state. Acceptable quantum bound states must go asymptotically to zero in the classically forbidden regions at large positive and negative x. Adjust the energy until that condition is (approximately) reached to find the energy eigenvalues and eigenstates. Choose the variational option to find the lowest energy for a Gaussian and (for ground state of linear potential) a truncated cosine-squared wave function.

Linear

Odd

Square

Harmonic

Double square

Even

Scaling

POTENTIAL

WAVE FUNCTION

Show classical turning points

x 10^

Show variational result

Gaussian

Squared cosine

d = true
Width = 2 (slider from 0.2 to 5, step 0.1)
Vscale = 1 (slider from 0.1 to 20, step 0.1)
β = 1.49 (slider from 0.1 to 3, step 0.01)
Vlin1b: Vscale * 8 / (3 * π) * (3 * π^(2) / 32 - 0.5) * β
PsiV1b = If(abs(x) ≤ π * β / 2, sqrt(8 / (3 * π * β)) * cos(x / β)^(2), 0)
Vsq1b: 2 * Vscale * Integral[PsiV1b(x)^(2), Width / 2, Width / 2 + 3 * β]
Vav1b = If(d, Vlin1b, Vsq1b)
PsiV2(x) = sqrt(2) / (π^(0.25) * sqrt(β)) * x / β * ℯ^(-(x^(2) / (2 * β^(2))))
Vlin2: Vscale * 2 * β / sqrt(π)
Vsq2: 2 * Vscale * Integral[PsiV2(x)^(2), Width / 2, Width / 2 + 3 * β]
Vlin1: Vscale * β / sqrt(π)
PsiV1(x) = ℯ^(-(x^(2) / (2 * β^(2)))) / (sqrt(β) * π^(1 / 4))
Vsq1: 2 * Vscale * Integral[PsiV1(x)^(2), Width / 2, Width / 2 + 3 * β]
b = false
Separation = 1 (slider from 0 to 10, step 0.1)
edge = 0.02
Cent: (Separation + Width) / 2
C: ((-Width) / 2, Vscale)
e = false
c = false
Double(x) = Vscale * (1 - 1 / (1 + ℯ^((abs(x - Cent) - Width / 2) / edge)) - 1 / (1 + ℯ^((abs(x + Cent) - Width / 2) / edge)))
Square(x) = Vscale * (1 - 1 / (1 + ℯ^((abs(x) - Width / 2) / edge)))
Vscale_1: Vscale
Linear(x) = Vscale_1 * abs(x)
SHO(x) = 0.25 * Vscale_1 * x^(2)
V = If(c, SHO, If[d, Linear, If[e, Square, Double]])
Coarse = 1.1 (slider from 0 to 20, step 0.1)
Fine = -0.08 (slider from -0.5 to 0.5, step 0.0020)
E: Coarse + Fine
M: (0, E)
m = OrthogonalLine(M, yAxis)
f = false
A = Intersect(V, m, (-1.02, 1.02))
a = true
Even_1: a
Vindex = 2
CTP = If(e, Width / 2, If[f, Width + Separation / 2, x(A)])
Symm = If(Even_1 ≟ true, 1, -1)
Psiscale_1 = 1
Scale = 1 (slider from 0.1 to 10, step 0.1)
Odd_1: b
Range = 4.5 (slider from 1 to 10, step 0.5)
dx = 0.05
text3: "ENERGY = " + E + ""
B: ((-Width) / 2, 0)
D: (Width / 2, 0)
F: (Width / 2, Vscale)
G: ((-Separation) / 2 - Width, 0)
H: ((-Separation) / 2 - Width, Vscale)
B_1: ((-Width) / 2, 0)
C_1: ((-Width) / 2, Vscale)
D_1: (Width / 2, 0)
F_1: (Width / 2, Vscale)
G_1: ((-Separation) / 2, 0)
H_1: ((-Separation) / 2, Vscale)
G_2: (Separation / 2, 0)
H_2: (Separation / 2, Vscale)
B_2: ((-Width) / 2, 0)
C_2: ((-Width) / 2, Vscale)
D_2: (Width / 2, 0)
F_2: (Width / 2, Vscale)
G_3: (Separation / 2 + Width, 0)
H_3: (Separation / 2 + Width, Vscale)
B_3: ((-Width) / 2, 0)
C_3: ((-Width) / 2, Vscale)
D_3: (Width / 2, 0)
F_3: (Width / 2, Vscale)
I: (-CTP, 0)
J: (-CTP, 2 * E)
j = Segment(I, J)
k = true
K: (CTP, 0)
L: (CTP, 2 * E)
l = Segment(K, L)
Power = 0 (slider from -10 to 10, step 1)
Scale1: Scale * 10^(Power)
loc8 = SolveODE(0, E - V(x), E^(2) - V(x) * E, 0, E + Scale1, 0, Range * CTP, dx)
loc6 = SolveODE(0, E - V(x), E^(2) - V(x) * E, 0, E + Scale1, 0, -Range * CTP, -dx)
loc3 = SolveODE(0, E - V(x), E^(2) - E * V(x), 0, E, Scale1, Range * CTP, 0.02)
loc1 = SolveODE(0, E - V(x), E^(2) - E * V(x), 0, E, Scale1, -Range * CTP, -dx)
bV = 2.1450293971110255
g = false
Vav1 = If(d, Vlin1, Vsq1)
EV1(x) = 1 / (2 * β^(2)) + Vav1
Vav2 = If(d, Vlin2, Vsq2)
EV2(x) = 3 / (2 * β^(2)) + Vav2
h = false
EV1b(x) = 8 / (3 * π) * 2 * π / (4 * β^(2)) + Vav1b
i = true
FracErr = If(a, 100 * If[h, (EV1(0) - E) / E, (EV1b(0) - E) / E], 100 * (EV2(0) - E) / E)
PsiV = If(h, If[a, EV1(x) + Scale1 * PsiV1(x), EV2(x) + Scale1 * PsiV2(x)], EV1b(x) + Scale1 * PsiV1b(x))
text5: "$ \frac{\delta E}{E} $=  " + (LaTeX[FracErr]) + "%"