Skip to content

Worked Examples, Exercises, and Notebooks

This chapter turns canonical models into practice and reproducible evidence. It routes readers to worked calculations already embedded across the volume, organizes exercises by cognitive demand, extracts recurring solution patterns, and sets the validation standard for numerical notebooks and visual assets.

The sequence matters. A plausible calculation is not automatically a trustworthy one. Assumptions, domains, normalization, and limiting checks make an analytic solution inspectable; reference results, convergence studies, and error accounting make a numerical result reproducible.

The chapter owns six functions:

  • finding worked examples by task rather than only by model name;
  • building graduated practice from direct calculations to research-facing extensions;
  • naming reusable problem-solving patterns;
  • indexing notebook artifacts and their reproducibility contract;
  • defining volume-specific benchmark problems;
  • admitting validated figures to the visualization gallery.

It does not duplicate the canonical derivations. The infinite square well is derived on its model page, the Landau spectrum on its model page, and the radial equation on its model page. This chapter explains how to practice, reproduce, and test those results.

The Mathematical Toolkit owns general numerical analysis, convergence theory, and error estimation. This chapter specializes those standards to wave-mechanics Hamiltonians, grids, basis truncations, propagation, scattering, and gauge-dependent representations.

The chapter can be read as a progression from learning to publication:

StageMain questionRequired evidence
Worked exampleCan each mathematical move be followed and checked?Assumptions, derivation, interpretation, and physical checks
ExerciseCan the method be transferred to a new problem?An explicit answer or solution strategy with checks
Problem-solving patternWhich reusable move applies?Conditions for use, first move, and failure modes
Numerical notebookCan another reader rerun the calculation?Method, parameters, environment, validation cells, and limitations
BenchmarkDoes the computation meet a stated accuracy target?Reference result, refinement study, tolerance, and diagnosis
VisualizationCan the image support a scientific claim?Provenance, caption, convention, accessibility, and validation

Skipping a stage weakens the result. A notebook that produces an attractive figure but has no benchmark is not yet a reference artifact. A benchmark that reports one small error but no refinement study does not demonstrate convergence. A worked derivation that suppresses its boundary conditions may solve a different model than the one named in its title.

A mature worked solution should make the complete problem visible before manipulating equations. A compact record is

(setup,H,H,D(H),scales,target,checks).\left( \text{setup}, \mathcal H, H, D(H), \text{scales}, \text{target}, \text{checks} \right).

In prose, record:

  1. the physical idealization and omitted effects;
  2. the configuration space and Hilbert-space measure;
  3. the Hamiltonian and sign conventions;
  4. the operator domain, boundaries, matching, or asymptotic data;
  5. the natural dimensionless parameters;
  6. the quantity being solved for;
  7. the normalization or flux convention;
  8. dimensional, limiting, symmetry, and conservation checks.

For a stationary one-dimensional model, the target may be a discrete eigenvalue, a transcendental quantization condition, or a scattering amplitude. These require different final checks. A bound state should be normalizable and obey endpoint conditions. A scattering state should specify an incoming channel and satisfy current accounting.

Worked Examples Index routes to examples by task: normalization, expectation values, matching, eigenvalue problems, scattering, packet evolution, radial equations, angular probability, and magnetic fields.

Many stalled solutions begin with the wrong search question. “What is the answer for this potential?” is less useful than “Is this a regional matching problem, a symmetry reduction, a flux calculation, or a separation problem?”

Use this task map:

Problem signalLikely first moveMain diagnostic
Piecewise potentialSolve in each region and matchInterface conditions and current
Even potentialSplit into parity sectorsψ′(0)=0\psi'(0)=0 or ψ(0)=0\psi(0)=0
Many dimensional constantsNondimensionalizeIdentify the few control ratios
Reflection or transmissionCompute probability currentR+T=1R+T=1 for a conservative channel
Bound or radial stateApply asymptotic and regularity conditionsExclude growing or nonphysical branches
Product geometrySeparate variablesPreserve each coordinate measure and domain
Vector potentialChoose a symmetry-adapted gaugeInterpret gauge-invariant quantities
Complicated final formulaTake controlled limitsRecover a simpler canonical model

Problem-Solving Patterns is the canonical home for these moves and their common failure modes.

For piecewise regular potentials, write the most general local solution in each region, then impose the conditions belonging to the interaction. At a finite interface with constant mass,

ψ(x0−)=ψ(x0+),ψ′(x0−)=ψ′(x0+).\psi(x_0^-)=\psi(x_0^+), \qquad \psi'(x_0^-)=\psi'(x_0^+).

At a delta interaction V(x)=λδ(x)V(x)=\lambda\delta(x),

ψ(0−)=ψ(0+),\psi(0^-)=\psi(0^+),

but

ψ′(0+)−ψ′(0−)=2mλℏ2ψ(0).\psi'(0^+)-\psi'(0^-) = \frac{2m\lambda}{\hbar^2} \psi(0).

At an infinite wall, the configuration-space domain ends and the wavefunction vanishes. These three cases are not interchangeable.

For bound states, discard growing asymptotic exponentials before solving the matching determinant. For scattering, state the incoming direction and retain the outgoing reflected and transmitted channels. This prevents algebraically valid coefficients from being assigned the wrong physical meaning.

If V(x)=V(−x)V(x)=V(-x), solve even and odd sectors separately. At the symmetry center,

evenψ′(0)=0oddψ(0)=0\begin{array}{c|c} \text{even} & \psi'(0)=0 \\ \text{odd} & \psi(0)=0 \end{array}

This reduces unknowns and provides a numerical check. A computed nondegenerate eigenstate of an exactly symmetric one-dimensional Hamiltonian should have definite parity, up to numerical mixing and phase.

Scaling should happen before heavy algebra. For a length LL,

EL=ℏ22mL2,ξ=xL,λ=V0EL.E_L = \frac{\hbar^2}{2mL^2}, \qquad \xi=\frac{x}{L}, \qquad \lambda=\frac{V_0}{E_L}.

The dimensionless equation reveals which parameters actually matter and makes numerical resolution requirements explicit. A grid spacing Δx\Delta x is not “small” until compared with the shortest de Broglie wavelength, decay length, oscillator length, or magnetic length in the problem.

A right-moving plane wave AeikxAe^{ikx} carries

j=ℏkm∣A∣2.j = \frac{\hbar k}{m} \lvert A\rvert^2.

Therefore, for equal masses but different asymptotic wavenumbers,

T=ktranskinc∣t∣2.T = \frac{k_{\mathrm{trans}}}{k_{\mathrm{inc}}} \lvert t\rvert^2.

Amplitude squares alone are insufficient. For a real time-independent one-channel potential with no absorption,

R+T=1R+T=1

is both a physical law and an algebra check.

Asymptotic conditions select globally physical solutions from local differential-equation branches. Bound states reject growth at infinity. Radial states enforce the allowed origin behavior. Scattering states name incoming and outgoing channels.

Separation of variables adds a measure check. In spherical coordinates,

d3r=r2sin⁡θ dr dθ dϕ.d^3r = r^2\sin\theta\,dr\,d\theta\,d\phi.

The reduced radial function u=rRu=rR is normalized with drdr, while RR is normalized with r2drr^2dr. A successful algebraic separation can still produce a wrongly normalized state if the measure is forgotten.

Exercise Sets uses five levels:

LevelCognitive roleTypical evidence
1Direct calculationCorrect substitution, derivative, integral, or normalization
2Conceptual interpretationClear physical meaning and convention awareness
3DerivationA result obtained from stated assumptions and boundary data
4ComputationalReproducible setup, convergence, and benchmark comparison
5Challenge or bridgeA controlled connection to later material without importing it wholesale

A useful study session mixes levels. One direct calculation builds fluency, one conceptual question checks interpretation, and one derivation tests whether the method can be reconstructed. Computational work should follow only after the target equation and validation quantity are known.

The sets cover normalization, bound-state domains, scattering and tunneling, oscillators and two-level systems, three-dimensional separation, angular structure, and magnetic fields. Individual model pages retain their own focused exercises; the chapter-level sets organize transferable practice.

A computational exercise becomes a notebook only when another reader can rerun and audit it. Numerical Notebooks Index requires every notebook to state

  • purpose and canonical page;
  • analytic or benchmark target;
  • numerical method and discretization;
  • dimensionless parameters and units;
  • Python and library versions;
  • expected outputs;
  • validation checks and tolerances;
  • known limitations and failure modes.

The initial repository contains nine clean notebook sources covering

FamilyCalculationPrimary check
One-dimensional bound systemsInfinite and finite wellsExact spectrum, orthogonality, tails, and bound-state count
Free motionGaussian spreadingNorm and analytic packet width
ScatteringBarrier packet evolutionNorm and reflected/transmitted accounting
Harmonic oscillatorGrid eigenstatesSpectrum, parity, and orthogonality
Two-level systemsMatrix dynamicsExact transition probability
Hydrogenic systemsRadial functionsr2drr^2dr normalization and energy scaling
Three-dimensional angular functionsSpherical harmonicsAngular normalization and orthogonality
Electromagnetic fieldsLandau levelsLevel spacing and flux degeneracy

The notebooks are source artifacts, not substitutes for the canonical prose pages. Their purpose is to expose discretization and verify known physics before the same machinery is trusted on a less soluble model.

Notebook and figure status should use precise language:

StatusMeaning
PlannedScope and validation target are named, but no artifact exists
CommittedSource file exists at a stable path
Validation-readyAutomated or explicit checks are encoded
ValidatedChecks pass in a stated environment and parameter regime
Publication-readyOutputs, provenance, caption, accessibility, and build integration are complete

“It ran once” is weaker than validated. “The plot looks right” is weaker than a benchmark. A clean notebook may deliberately omit stored outputs; in that case the validation method and expected pass conditions must remain inspectable in source.

Benchmark Problems defines six initial wave-mechanics benchmarks: infinite well, harmonic oscillator, finite well, free Gaussian packet, rectangular barrier, and Landau levels.

A benchmark record should contain

(reference,observable,refinement variable,error metric,tolerance,diagnosis).\left( \text{reference}, \text{observable}, \text{refinement variable}, \text{error metric}, \text{tolerance}, \text{diagnosis} \right).

For an exact energy EnrefE_n^{\mathrm{ref}}, a common metric is

εn=∣Ennum−Enref∣∣Enref∣.\varepsilon_n = \frac{ \lvert E_n^{\mathrm{num}}-E_n^{\mathrm{ref}}\rvert }{ \lvert E_n^{\mathrm{ref}}\rvert }.

One small value of εn\varepsilon_n is not a convergence study. Vary grid spacing, basis size, box size, time step, or solver tolerance according to the suspected error source. If

ε(h)≈Chp,\varepsilon(h) \approx C h^p,

then two refinements estimate the observed order:

pobs=log⁡[ε(h)/ε(h/2)]log⁡2.p_{\mathrm{obs}} = \frac{ \log[\varepsilon(h)/\varepsilon(h/2)] }{ \log2 }.

The benchmark report should interpret the error. Domain truncation, discretization, iterative-solver tolerance, finite-time measurement, and roundoff are different diagnoses and require different refinements.

One conserved quantity rarely validates an entire simulation. For closed time evolution,

∥ψ(t)∥2=1\lVert\psi(t)\rVert^2 = 1

is necessary, but a packet can conserve norm while spreading at the wrong rate or accumulating the wrong phase. For a time-independent Hamiltonian, also monitor ⟨H⟩\langle H\rangle when the numerical method should preserve it.

For eigenproblems, check energies, normalization, orthogonality, symmetry, boundary behavior, and convergence. For scattering, check total norm, current or regional probability accounting, packet separation, boundary reflections, and the narrow-band comparison with stationary transmission.

For Landau calculations, equally spaced eigenvalues do not establish the flux degeneracy. The gauge convention, finite geometry, guiding-center count, and boundary effects must also be stated.

Visualization Gallery separates a visual recognition gallery from an evidence-backed asset registry. A figure is admitted only when it has

  1. a stable asset path;
  2. a tracked TikZ or notebook source;
  3. descriptive alt text;
  4. a caption naming the plotted quantity and convention;
  5. parameter values or dimensionless scales;
  6. a validation statement or an explicit schematic label;
  7. a link to the canonical physics page.

For an animation, also state the time step, playback speed, and whether frames come from validated evolution or schematic interpolation.

The distinction among ψ\psi, Re⁡ψ\operatorname{Re}\psi, ∣ψ∣\lvert\psi\rvert, and ∣ψ∣2\lvert\psi\rvert^2 must never be left to visual guesswork. A radial density should identify whether it shows ∣R∣2\lvert R\rvert^2 or r2∣R∣2r^2\lvert R\rvert^2. A magnetic wavefunction should name the gauge. Color must not be the only carrier of essential information.

The infinite well illustrates the whole evidence ladder.

The analytic model uses

H=−ℏ22md2dx2,0<x<L,H = -\frac{\hbar^2}{2m} \frac{d^2}{dx^2}, \qquad 0\lt x\lt L,

with ψ(0)=ψ(L)=0\psi(0)=\psi(L)=0. Its exact energies are

En=n2π2ℏ22mL2,n=1,2,….E_n = \frac{n^2\pi^2\hbar^2}{2mL^2}, \qquad n=1,2,\ldots .

A finite-difference notebook must state the interior grid, boundary rows, kinetic stencil, and physical grid norm. A benchmark should vary Δx\Delta x, compare low-lying energies, estimate convergence order, and check eigenvector orthogonality. A figure should show hard-wall nodes and label whether curves are wavefunctions or densities. Only the combination supports a trustworthy reference artifact.

For analytic practice, begin with Worked Examples Index, then Problem-Solving Patterns and Exercise Sets.

For computational work, read Numerical Notebooks Index before Benchmark Problems. Treat Visualization Gallery as the final presentation and checking step, after the calculation is understood.

PageCanonical role
Worked Examples IndexTask-oriented route map to examples distributed across the volume
Exercise SetsFive-level practice across the main canonical systems
Problem-Solving PatternsMatching, parity, scaling, current, asymptotics, separation, gauge, and limits
Numerical Notebooks IndexNotebook roster, reproducibility contract, and validation expectations
Benchmark ProblemsReference targets, pass criteria, convergence, and reporting format
Visualization GalleryAsset provenance, admission checklist, captions, and accessibility
  • Copying a final formula instead of recording the assumptions that make it valid.
  • Solving before identifying the domain, measure, and target quantity.
  • Looking up an example by model name when the missing skill is matching, scaling, or current accounting.
  • Reading a solution before making a serious attempt at the exercise.
  • Turning a computational exercise into a notebook without a reference result.
  • Calling one-grid agreement convergence.
  • Checking norm conservation while ignoring wrong dynamics or phase.
  • Comparing finite-box numerics directly with an infinite-domain formula without a domain study.
  • Moving a tolerance after a regression so the benchmark passes.
  • Publishing a plot before its source, convention, and validation are documented.
  • Treating a planned visualization as if the asset already exists.
  • Mistaking a gauge-dependent wavefunction image for a gauge-invariant conclusion.
  • D. J. Griffiths and D. F. Schroeter, Introduction to Quantum Mechanics, 3rd ed., Cambridge University Press, 2018.
  • C. Cohen-Tannoudji, B. Diu, and F. Laloë, Quantum Mechanics, Wiley, 1977.
  • R. Shankar, Principles of Quantum Mechanics, 2nd ed., Springer, 1994.
  • E. Merzbacher, Quantum Mechanics, 3rd ed., Wiley, 1998.
  • L. N. Trefethen and D. Bau III, Numerical Linear Algebra, SIAM, 1997.
  • R. J. LeVeque, Finite Difference Methods for Ordinary and Partial Differential Equations, SIAM, 2007.
  • J. M. Thijssen, Computational Physics, 2nd ed., Cambridge University Press, 2007.
  1. A finite-well solution quotes a transcendental energy equation but does not state parity, matching conditions, or exterior normalization. List the missing evidence needed before the solution is reusable.
Solution

The solution should state the well geometry and energy zero, define the interior and exterior wavenumbers, separate even and odd sectors or explain why parity is unavailable, and impose continuity of ψ\psi and ψ′\psi' at each finite interface. It should reject growing exterior exponentials, normalize the full state including its tails, identify the dimensionless depth parameter, and check the deep-well or threshold limit. The transcendental equation alone does not reveal these choices.

  1. A second-order finite-difference calculation has relative errors 8.0×10−48.0\times10^{-4} at spacing hh and 2.0×10−42.0\times10^{-4} at spacing h/2h/2. Estimate the observed convergence order.
Solution

Use

pobs=log⁡[ε(h)/ε(h/2)]log⁡2.p_{\mathrm{obs}} = \frac{ \log[\varepsilon(h)/\varepsilon(h/2)] }{ \log2 }.

Here

ε(h)ε(h/2)=8.0×10−42.0×10−4=4,\frac{\varepsilon(h)}{\varepsilon(h/2)} = \frac{8.0\times10^{-4}}{2.0\times10^{-4}} = 4,

so

pobs=log⁡4log⁡2=2.p_{\mathrm{obs}} = \frac{\log4}{\log2} = 2.

This is consistent with second-order convergence over these two resolutions, though more refinements are needed to establish an asymptotic trend.

  1. A conservative barrier-packet simulation reports R+T=0.97R+T=0.97 while total norm remains 11 to high precision. Give three possible diagnoses.
Solution

Some probability may still remain near the barrier because the reflected and transmitted packets have not fully separated. Probability may lie outside the integration windows used to define RR and TT. Boundary reflections or an absorbing region may contaminate the regional accounting even if the reported interior norm uses a different domain. The calculation should also check whether RR and TT were inferred from current or properly integrated packet probabilities rather than raw amplitude heights.

  1. A plot of hydrogen radial structure has a source notebook and attractive axes, but its caption says only “2p2p orbital.” What must be added before admission to the visualization gallery?
Solution

The caption must identify the plotted quantity, for example R21(r)R_{21}(r), ∣R21(r)∣2\lvert R_{21}(r)\rvert^2, or r2∣R21(r)∣2r^2\lvert R_{21}(r)\rvert^2, and state the radial scale and normalization convention. It should give the relevant parameters, explain the physical feature being shown, and cite the validation check, such as radial normalization or comparison with the analytic function. The asset also needs descriptive alt text and a link to the canonical hydrogenic page.