A companion to the reference series. Reading about QM is not the same as doing it; so here are three canonical calculations, worked in full, showing every step of the algebra.
We’ll do one problem of each type:
Computing an expectation value; ⟨x⟩ and ⟨x2⟩ for the ground state of the harmonic oscillator
Solving the Schrödinger equation for a new potential; the infinite square well (from scratch)
Diagonalizing a Hamiltonian by hand; a two-level system (spin in a magnetic field)
These three skills, practiced over and over, are the bulk of what an intro QM course trains you to do.
Problem 1: Expectation Values for the Harmonic Oscillator Ground State
The Setup
The quantum harmonic oscillator has Hamiltonian
H^=2mp^2+21mω2x^2
Its ground state wave function is a Gaussian:
ψ0(x)=(πℏmω)1/4e−mωx2/(2ℏ)
Define the characteristic length α=mω/ℏ to simplify notation. Then
ψ0(x)=(πα)1/4e−αx2/2
Our task: compute ⟨x⟩, ⟨x2⟩, and from those the uncertainty Δx.
Step 1: Verify Normalization
Before anything else, check that ∫∣ψ0∣2dx=1. This is a sanity check and a warm-up for the Gaussian integrals we’ll need.
∫−∞∞∣ψ0(x)∣2dx=(πα)1/2∫−∞∞e−αx2dx
Using the standard Gaussian integral ∫−∞∞e−αx2dx=π/α:
=(πα)1/2⋅απ=1✓
Good. The normalization constant (α/π)1/4 is correct.
Step 2: Compute ⟨x⟩
⟨x⟩=∫−∞∞ψ0∗(x)xψ0(x)dx=(πα)1/2∫−∞∞xe−αx2dx
The integrand is x⋅(even function), which is odd. The integral of an odd function over a symmetric interval is zero.
⟨x⟩=0
This makes physical sense: the ground state is symmetric around x=0, so the expected position is at the center.
Step 3: Compute ⟨x2⟩
⟨x2⟩=(πα)1/2∫−∞∞x2e−αx2dx
Now we need ∫−∞∞x2e−αx2dx. A nice trick: differentiate the basic Gaussian integral with respect to α.
Start from
I(α)=∫−∞∞e−αx2dx=απ=π⋅α−1/2
Differentiate both sides with respect to α:
dαdI=−∫−∞∞x2e−αx2dx=π⋅(−21)α−3/2
Therefore:
∫−∞∞x2e−αx2dx=2πα−3/2=2α1απ
Plug back in:
⟨x2⟩=(πα)1/2⋅2α1απ=2α1
Recalling α=mω/ℏ:
⟨x2⟩=2mωℏ
Step 4: Extract the Uncertainty
(Δx)2=⟨x2⟩−⟨x⟩2=2mωℏ−0=2mωℏ
Δx=2mωℏ
Aside: What About Δp?
By a nearly identical calculation (or by symmetry between position and momentum representations of a Gaussian), one finds
Δp=2mωℏ
Multiplying:
ΔxΔp=2mωℏ⋅2mωℏ=2ℏ
The ground state saturates the uncertainty principle; it’s the minimum-uncertainty state. This is a special property of Gaussians and a key reason why coherent states (shifted Gaussians) are called “the most classical” quantum states.
Problem 2: Solving the Schrödinger Equation for the Infinite Square Well
The Setup
A particle of mass m is trapped in a 1D region between x=0 and x=L, where the potential is
V(x)={0∞0<x<Lotherwise
Our task: find the allowed energy levels and the wave functions, from first principles.
Step 1: Reason About the Wave Function Outside the Well
Inside regions where V=∞, the wave function must vanish (otherwise the energy ∫V∣ψ∣2dx diverges). So:
ψ(x)=0forx≤0 and x≥L
For the wave function to be continuous at the boundaries:
ψ(0)=0,ψ(L)=0
These are our boundary conditions. They’re what force quantization.
Step 2: Write the Schrödinger Equation Inside the Well
Inside, V=0, so the time-independent Schrödinger equation is
−2mℏ2dx2d2ψ=Eψ
Rearrange:
dx2d2ψ=−ℏ22mEψ
Define
k2=ℏ22mE⟺E=2mℏ2k2
Then
ψ′′=−k2ψ
A second-order ODE with constant coefficients; from section 8 of the math prereqs.
Step 3: General Solution
The equation ψ′′+k2ψ=0 has general solution
ψ(x)=Asin(kx)+Bcos(kx)
where A and B are constants to be determined.
Step 4: Apply Boundary Conditions
Left boundary (x=0):
ψ(0)=Asin(0)+Bcos(0)=B=0
So B=0 and the solution reduces to ψ(x)=Asin(kx).
Right boundary (x=L):
ψ(L)=Asin(kL)=0
We can’t have A=0 (that’s the trivial zero solution; no particle). So we need
sin(kL)=0
This is satisfied only when kL is an integer multiple of π:
kL=nπ,n=1,2,3,…
(We exclude n=0 because that gives ψ=0 everywhere, and we exclude negative n because they give the same wave function up to a sign.)
Step 5: Quantized Energy Levels
From k=nπ/L and E=ℏ2k2/(2m):
En=2mL2n2π2ℏ2,n=1,2,3,…
The energy is quantized; only discrete values are allowed. This came from nothing but the boundary conditions forcing the wave to “fit” in the box.
Key observations:
The ground state (n=1) has nonzero energy: E1=π2ℏ2/(2mL2). This is the zero-point energy; you cannot put the particle at rest, period.
Spacing grows as n2: E2=4E1, E3=9E1, etc.
Energy scales as 1/L2: squeeze the box, the energies skyrocket (Heisenberg again).
Step 6: Normalize the Wave Functions
The wave function is ψn(x)=Asin(nπx/L). Find A by demanding ∫0L∣ψn∣2dx=1:
∣A∣2∫0Lsin2(Lnπx)dx=1
Using the identity sin2θ=21(1−cos2θ):
∫0Lsin2(Lnπx)dx=∫0L21[1−cos(L2nπx)]dx
The cos integrates to zero over a full period (and n full periods fit in L), so:
=21⋅L=2L
Therefore ∣A∣2⋅L/2=1, giving A=2/L:
ψn(x)=L2sin(Lnπx),n=1,2,3,…
Step 7: Sanity Checks
Orthogonality: different eigenstates should be orthogonal. For m=n:
⟨ψm∣ψn⟩=L2∫0Lsin(Lmπx)sin(Lnπx)dx
Using sinAsinB=21[cos(A−B)−cos(A+B)] and integrating, this vanishes. ✓
Nodes:ψn has n−1 interior nodes (zeros). Ground state: 0 nodes. First excited: 1 node. Classic pattern; more nodes means more kinetic energy (wave function curves more), which matches higher En.
Classical limit: for large n, ∣ψn∣2 oscillates rapidly and averages to 1/L; uniform, as expected for a classical particle bouncing in a box.
That’s the full solution. Every step was mechanical: set up the ODE, impose boundary conditions, normalize. This template is the same for every bound-state problem; only the specific ODE and boundary conditions change.
Problem 3: Diagonalizing a Hamiltonian by Hand
The Setup
Consider a spin-½ particle (like an electron) in a magnetic field pointing along the x-axis. The Hamiltonian is
H^=−γS^xB=−γB⋅2ℏσx
where γ is the gyromagnetic ratio and σx is the Pauli matrix. Define ω0=γB (the Larmor frequency). Then
H^=−2ℏω0σx=−2ℏω0(0110)
The computational basis is the eigenbasis of σz:
∣↑⟩=(10),∣↓⟩=(01)
Our task: find the eigenvalues (allowed energies) and eigenvectors (stationary states), then use them to compute the time evolution of a state that starts as ∣↑⟩.
Step 1: Find the Eigenvalues
We need eigenvalues λ of the matrix
H=−2ℏω0(0110)
The characteristic equation is det(H−λI)=0:
det(−λ−ℏω0/2−ℏω0/2−λ)=0
Expanding:
λ2−(2ℏω0)2=0
λ=±2ℏω0
So the two energy eigenvalues are:
E+=−2ℏω0,E−=+2ℏω0
(The labels ± indicate the sign of σx, not of the energy; I’ll make this explicit below.)
Step 2: Find the Eigenvectors
For E+=−ℏω0/2, solve (H−E+I)v=0:
[−2ℏω0(0110)+2ℏω0(1001)](ab)=0
Factor out ℏω0/2:
(1−1−11)(ab)=(00)
First row: a−b=0, so a=b. Pick a=b=1/2 for normalization:
∣+⟩=21(11)=21(∣↑⟩+∣↓⟩)
For E−=+ℏω0/2, solve (H−E−I)v=0:
(−1−1−1−1)(ab)=(00)
First row: −a−b=0, so a=−b. Pick a=1/2, b=−1/2:
∣−⟩=21(1−1)=21(∣↑⟩−∣↓⟩)
These are exactly the σx eigenstates; spin pointing along ±x^. Makes sense: H is proportional to σx, so they share eigenvectors.
Orthogonality check:⟨+∣−⟩=21(1⋅1+1⋅(−1))=0. ✓
Step 3: Verify by Explicit Diagonalization
Form the matrix P with eigenvectors as columns:
P=21(111−1)
Notice this is Hermitian and unitary: P†P=I. Also P−1=P†=P (it happens to be self-inverse).
Compute P†HP:
P†HP=21(111−1)⋅(−2ℏω0)(0110)⋅(111−1)
Work out the middle product first:
(0110)(111−1)=(11−11)
Now multiply by the left factor:
(111−1)(11−11)=(200−2)
Including prefactors:
P†HP=−2ℏω0⋅21⋅(200−2)=(−ℏω0/200+ℏω0/2)
Diagonal, with the eigenvalues E+ and E− on the diagonal. ✓ The diagonalization is correct.
Step 4: Use It; Time Evolution
Now for the payoff. Suppose at t=0 the system is in state ∣↑⟩. What is ∣ψ(t)⟩?
Strategy: Expand in the energy eigenbasis, apply time evolution factor e−iEnt/ℏ to each component, recombine.
Expand ∣↑⟩ in the ∣±⟩ basis:
Inverting the definitions ∣±⟩=21(∣↑⟩±∣↓⟩):
∣↑⟩=21(∣+⟩+∣−⟩)
Apply time evolution:
∣ψ(t)⟩=21(e−iE+t/ℏ∣+⟩+e−iE−t/ℏ∣−⟩)
Substituting E±=∓ℏω0/2:
∣ψ(t)⟩=21(eiω0t/2∣+⟩+e−iω0t/2∣−⟩)
Convert back to the {∣↑⟩,∣↓⟩} basis using ∣±⟩=21(∣↑⟩±∣↓⟩):
Physical picture: The spin oscillates between ∣↑⟩ and ∣↓⟩ with frequency ω0. This is Larmor precession; a spin in a magnetic field perpendicular to its initial orientation rotates in the plane perpendicular to the field.
This single calculation is the foundation of:
Nuclear magnetic resonance (NMR)
Magnetic resonance imaging (MRI)
Single-qubit operations in a quantum computer
Every NMR machine in every hospital is running exactly this physics, driven by a magnetic field that acts as H=−γS⋅B on nuclear spins.
What Just Happened
Look back at what these three problems actually involved:
Problem 1 was just Gaussian integrals. We wrote down ⟨xn⟩=∫ψ∗xnψdx and ground through the algebra. Differentiating under the integral sign (a trick from multivariable calculus) gave us the extra x2 factor. The “quantum” content was small; the math content was everything.
Problem 2 was a second-order ODE with boundary conditions. Exactly the kind of problem you solve in a differential equations class. What’s different is the interpretation: the boundary conditions are physical, and they force the allowed energies to be discrete. Quantization is just the eigenvalue spectrum of a boundary value problem.
Problem 3 was diagonalizing a 2×2 matrix. Not a single calculation in problem 3 would be unfamiliar to someone who’s taken linear algebra. The entire thing is find-the-eigenvalues, find-the-eigenvectors, expand-in-the-eigenbasis, apply time evolution component by component. Every ingredient is from the math prerequisites document.
This is the honest truth about quantum mechanics at this level: the conceptual framework is deeply strange, but the actual day-to-day calculations are mostly just math; complex numbers, linear algebra, ODEs, and integrals; applied with physical interpretation.
Learning to do these calculations fluently is the work. And the only way to get fluent is to do more of them.
Recommended Next Problems (from Griffiths or any intro QM text)
Compute ⟨x⟩, ⟨x2⟩, ⟨p⟩, ⟨p2⟩ for the n-th infinite square well state. Verify the uncertainty principle.
Find the transmission coefficient for a rectangular potential barrier (tunneling).
Solve the finite square well (harder because the wave function doesn’t vanish at the boundary).
Work out the time evolution of a general spin state in an arbitrary magnetic field direction.
Compute expectation values in a superposition state of two harmonic oscillator eigenstates; notice how ⟨x(t)⟩ oscillates at the classical frequency.
Each of these uses the same three skills demonstrated here, combined in different ways. After you’ve done twenty or so, the template stops feeling like a template and just becomes how you think.