At a glance
A particle trapped between two impenetrable walls is described by a standing wave, and only some waves are allowed. This sim shows those allowed states, the probability density for the particle's position, and the position results a measurement would give.
What you'll learn
- How the number of nodes and the energy of a state depend on n.
- What |ψ|² tells you, and how a histogram of position results builds it up.
- How the picture changes as n gets large.
- Which parts of the display change with time, and which do not.
What's on screen
- Wave ψ (top plot, blue): the real part of the wave function. Red dots mark where it crosses zero inside the box.
- Probability density |ψ|² (bottom plot, pink): probability per unit length, so the area under it is 1.
- Green dot and fading trail: simulated position results, one at a time. Green bars (when the histogram is on): the results counted into 50 bins.
- Energy levels (left of the top plot): n = 1 to 10, with the current n highlighted.
The controls
Press ⌖ on a row to see where that control sits in the sim.
| Control | What it changes | Range | |
|---|---|---|---|
| Energy Level n | Which state is shown. Changing n clears the histogram and sets the measurement rate back to 10 /s. | 1–10 opens at 1 | |
| Box Length L | Readout only. Lengths in the sim are in units of L. | 1.00 fixed | |
| Override ω | Off: the wave oscillates at the frequency its energy sets. On: you set the frequency with the slider below. This changes only the viewing speed. | on / off opens off | |
| Animation ω | The oscillation frequency while Override is on. The slider is disabled when Override is off. | 0–10 ω₀ opens at 1 ω₀ | |
| Measurement rate | How many simulated position results are drawn each second. | 1–25 /s opens at 10 /s | |
| Show / Hide Histogram | Shows or hides the green bars. Results are counted either way. | on / off opens off | |
| Clear Histogram | Empties the bins and the Measurements count. | button | |
| State properties | Time, energy E in units of E₁, frequency ω, ⟨x⟩ in L, Δx in L and ⟨p⟩ in ħ/L. The sim prints ⟨x⟩ = 0.50 L and ⟨p⟩ = 0 as fixed values, exact for every n. | panel | |
| Eigenstate | The wave function and wavelength of the current state. | panel | |
| Pause / Start | Stops or resumes the animation. Pausing also stops the measurements. | top bar | |
| Reset | Returns the sim to its opening state: n = 1, Override off, rate 10 /s, histogram off and empty. | top bar |
Fixed: ħ = m = L = 1 in the sim's units. The walls are infinitely high.
Only some waves fit between the walls
The walls are infinitely high, so the particle cannot be outside the box and ψ must be exactly zero at x = 0 and x = L. Inside, V = 0, and the condition ψ(0) = 0 leaves a sine wave.
- Only sines that are zero at both walls survive: those that fit a whole number n of half-wavelengths. n counts the humps.
- A state with quantum number n has n − 1 nodes: points inside the box where ψ = 0. These are the red dots in the sim.
- n = 0 would give ψ = 0 everywhere: no particle. The list starts at n = 1.
The energy ladder: En = n²E₁
Fitting n half-waves into the box fixes the wavelength. The de Broglie relation, p = h/λ, turns that into a momentum.
Inside the box V = 0, so the energy is all kinetic:
- The levels are not evenly spaced: the gap above level n is (2n + 1)E₁, so 3E₁, 5E₁, 7E₁, and so on.
- The lowest energy is E₁ = π²ħ²/2mL², not zero. Confinement forces the particle to carry kinetic energy.
This slider moves the sim too.
Where the particle is found
|ψ|² is a probability density: probability per unit length. The probability of a result between a and b is the area under it, and the total area is 1.
- Each green dot is one simulated position result, drawn at random from |ψ|². The histogram counts the dots into 50 bins, scaled to the same height as the pink curve, so the bars approach the curve as results accumulate.
- The nodes are places where |ψ|² = 0, so no result lands there. At n = 2 that includes the centre, yet the average position is ⟨x⟩ = L/2: an average need not be a place where results occur.
- ⟨p⟩ = 0 for every n. A standing wave is an equal mix of right- and left-moving waves, but the kinetic energy is not zero.
Large n looks classical
A classical particle bouncing between the walls at constant speed spends equal time everywhere: its density is flat, 1/L. At n = 1 the quantum density is far from flat: it peaks at the centre and is zero at the walls.
- As n grows, the humps get narrower. Their spacing is L/n, so averaged over a few humps the density approaches 1/L.
- Δx follows: 0.18 L at n = 1, 0.27 L at n = 2, 0.288 L at n = 10, approaching the flat-density value L/√12 = 0.289 L.
- The nodes never go away. They become too close together to resolve. A 1 g bead moving at 1 mm/s in a 10 cm box has n ≈ 3 × 10²⁶.
What moves on screen, and what does not
- The top plot draws the real part of Ψ, ψn(x) cos(ωnt). The shape is fixed; its height rises, falls and changes sign. The nodes stay where they are.
- |Ψ|² has no t in it, so the pink curve does not move, and neither does the distribution the green dots follow. A state like this is called stationary.
- ωn = En/ħ, so ωn ∝ n². The sim writes it as ω = n²ω₀, with ω₀ = 1 as its on-screen time unit.
- Override ω sets the frequency by hand. That changes only how fast you watch the wave oscillate. The energy and |ψ|² do not change.
Where it matters
- Dye molecules. Treat the electrons along a 1 nm conjugated chain as free electrons in a box. Two per level, six electrons fill n = 1–3, so the first jump is 3 → 4: 7E₁ ≈ 2.6 eV, about 470 nm. This is a first-order estimate.
- Quantum dots. E₁ ∝ 1/L²: a smaller dot has a larger gap and emits bluer light. This 1D box gives the trend only; real dots confine in three dimensions, with an effective mass.
- Confinement energy. Squeezing a particle raises its lowest energy. An electron in a 0.5 nm box has E₁ ≈ 1.5 eV.
Go deeper: a photon carries a jump, not E₁
- Absorption or emission moves the electron between levels, so the photon energy is a difference such as E₂ − E₁ = 3E₁.
- In a 0.5 nm box that is about 4.5 eV (275 nm); in a 1 nm box, about 1.1 eV (1100 nm).
Summary
Key points
- ψn(x) = √(2/L) sin(nπx/L), with n = 1, 2, 3, …
- En = n²E₁, and E₁ > 0: the particle is never at rest.
- |ψ|² is a probability density. The dots and the histogram sample it.
- In a stationary state |Ψ|² does not depend on time; only the phase of Ψ does.
Common mix-ups
- "The lowest state is n = 0, where the particle sits still." n = 0 gives ψ = 0 everywhere. The lowest state is n = 1, with energy E₁.
- "Triple n, triple the energy." Momentum triples, and energy goes as p², so it rises nine times.
- "At a node the particle moves through quickly." At a node |ψ|² = 0: a position result is never found there. The sim does not draw a trajectory.
Things to try on your own
- Set n = 4. Count the red nodes and read the energy, then compare with n − 1 and n²E₁.
- Set n = 2 with the histogram on and let it run past a few hundred results. Compare the two middle bins with the tallest ones.
- Set n = 3, turn Override on and lower ω. Check that the energy readout does not change.