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.
Scope and ownership
Section titled “Scope and ownership”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 evidence ladder
Section titled “The evidence ladder”The chapter can be read as a progression from learning to publication:
| Stage | Main question | Required evidence |
|---|---|---|
| Worked example | Can each mathematical move be followed and checked? | Assumptions, derivation, interpretation, and physical checks |
| Exercise | Can the method be transferred to a new problem? | An explicit answer or solution strategy with checks |
| Problem-solving pattern | Which reusable move applies? | Conditions for use, first move, and failure modes |
| Numerical notebook | Can another reader rerun the calculation? | Method, parameters, environment, validation cells, and limitations |
| Benchmark | Does the computation meet a stated accuracy target? | Reference result, refinement study, tolerance, and diagnosis |
| Visualization | Can 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.
Anatomy of a worked solution
Section titled “Anatomy of a worked solution”A mature worked solution should make the complete problem visible before manipulating equations. A compact record is
In prose, record:
- the physical idealization and omitted effects;
- the configuration space and Hilbert-space measure;
- the Hamiltonian and sign conventions;
- the operator domain, boundaries, matching, or asymptotic data;
- the natural dimensionless parameters;
- the quantity being solved for;
- the normalization or flux convention;
- 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.
Find the technique before the formula
Section titled “Find the technique before the formula”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 signal | Likely first move | Main diagnostic |
|---|---|---|
| Piecewise potential | Solve in each region and match | Interface conditions and current |
| Even potential | Split into parity sectors | or |
| Many dimensional constants | Nondimensionalize | Identify the few control ratios |
| Reflection or transmission | Compute probability current | for a conservative channel |
| Bound or radial state | Apply asymptotic and regularity conditions | Exclude growing or nonphysical branches |
| Product geometry | Separate variables | Preserve each coordinate measure and domain |
| Vector potential | Choose a symmetry-adapted gauge | Interpret gauge-invariant quantities |
| Complicated final formula | Take controlled limits | Recover a simpler canonical model |
Problem-Solving Patterns is the canonical home for these moves and their common failure modes.
Regional matching
Section titled “Regional matching”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,
At a delta interaction ,
but
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.
Symmetry and scaling
Section titled “Symmetry and scaling”If , solve even and odd sectors separately. At the symmetry center,
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 ,
The dimensionless equation reveals which parameters actually matter and makes numerical resolution requirements explicit. A grid spacing is not “small” until compared with the shortest de Broglie wavelength, decay length, oscillator length, or magnetic length in the problem.
Current, asymptotics, and separation
Section titled “Current, asymptotics, and separation”A right-moving plane wave carries
Therefore, for equal masses but different asymptotic wavenumbers,
Amplitude squares alone are insufficient. For a real time-independent one-channel potential with no absorption,
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,
The reduced radial function is normalized with , while is normalized with . A successful algebraic separation can still produce a wrongly normalized state if the measure is forgotten.
Exercise levels
Section titled “Exercise levels”Exercise Sets uses five levels:
| Level | Cognitive role | Typical evidence |
|---|---|---|
| 1 | Direct calculation | Correct substitution, derivative, integral, or normalization |
| 2 | Conceptual interpretation | Clear physical meaning and convention awareness |
| 3 | Derivation | A result obtained from stated assumptions and boundary data |
| 4 | Computational | Reproducible setup, convergence, and benchmark comparison |
| 5 | Challenge or bridge | A 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.
From exercise to notebook
Section titled “From exercise to notebook”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
| Family | Calculation | Primary check |
|---|---|---|
| One-dimensional bound systems | Infinite and finite wells | Exact spectrum, orthogonality, tails, and bound-state count |
| Free motion | Gaussian spreading | Norm and analytic packet width |
| Scattering | Barrier packet evolution | Norm and reflected/transmitted accounting |
| Harmonic oscillator | Grid eigenstates | Spectrum, parity, and orthogonality |
| Two-level systems | Matrix dynamics | Exact transition probability |
| Hydrogenic systems | Radial functions | normalization and energy scaling |
| Three-dimensional angular functions | Spherical harmonics | Angular normalization and orthogonality |
| Electromagnetic fields | Landau levels | Level 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.
Reproducibility states
Section titled “Reproducibility states”Notebook and figure status should use precise language:
| Status | Meaning |
|---|---|
| Planned | Scope and validation target are named, but no artifact exists |
| Committed | Source file exists at a stable path |
| Validation-ready | Automated or explicit checks are encoded |
| Validated | Checks pass in a stated environment and parameter regime |
| Publication-ready | Outputs, 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 design
Section titled “Benchmark design”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
For an exact energy , a common metric is
One small value of is not a convergence study. Vary grid spacing, basis size, box size, time step, or solver tolerance according to the suspected error source. If
then two refinements estimate the observed order:
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.
Validation is multidimensional
Section titled “Validation is multidimensional”One conserved quantity rarely validates an entire simulation. For closed time evolution,
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 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 admission
Section titled “Visualization admission”Visualization Gallery separates a visual recognition gallery from an evidence-backed asset registry. A figure is admitted only when it has
- a stable asset path;
- a tracked TikZ or notebook source;
- descriptive alt text;
- a caption naming the plotted quantity and convention;
- parameter values or dimensionless scales;
- a validation statement or an explicit schematic label;
- 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 , , , and must never be left to visual guesswork. A radial density should identify whether it shows or . A magnetic wavefunction should name the gauge. Color must not be the only carrier of essential information.
End-to-end example: infinite well
Section titled “End-to-end example: infinite well”The infinite well illustrates the whole evidence ladder.
The analytic model uses
with . Its exact energies are
A finite-difference notebook must state the interior grid, boundary rows, kinetic stencil, and physical grid norm. A benchmark should vary , 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.
Reading route
Section titled “Reading route”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.
Page map
Section titled “Page map”| Page | Canonical role |
|---|---|
| Worked Examples Index | Task-oriented route map to examples distributed across the volume |
| Exercise Sets | Five-level practice across the main canonical systems |
| Problem-Solving Patterns | Matching, parity, scaling, current, asymptotics, separation, gauge, and limits |
| Numerical Notebooks Index | Notebook roster, reproducibility contract, and validation expectations |
| Benchmark Problems | Reference targets, pass criteria, convergence, and reporting format |
| Visualization Gallery | Asset provenance, admission checklist, captions, and accessibility |
Common mistakes
Section titled “Common mistakes”- 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.
References
Section titled “References”- 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.
Exercises
Section titled “Exercises”- 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 and 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.
- A second-order finite-difference calculation has relative errors at spacing and at spacing . Estimate the observed convergence order.
Solution
Use
Here
so
This is consistent with second-order convergence over these two resolutions, though more refinements are needed to establish an asymptotic trend.
- A conservative barrier-packet simulation reports while total norm remains 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 and . 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 and were inferred from current or properly integrated packet probabilities rather than raw amplitude heights.
- A plot of hydrogen radial structure has a source notebook and attractive axes, but its caption says only “ orbital.” What must be added before admission to the visualization gallery?
Solution
The caption must identify the plotted quantity, for example , , or , 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.