Particle in a Box — Quantum Mechanics Visualizer Back
Quantum Mechanics

Particle in a Box — Quantum Mechanics Visualizer

Interactively visualize wave functions, energy levels, and time evolution of superposition states for the 1D infinite square well potential — the most fundamental model in quantum mechanics.

Parameters
Box width L
nm
Quantum number n (single state)
Superposition state
n₁
n₂
Playback Controls
Velocity
Elapsed time: 0.000 fs
Wave Function Overlay
Results
Energy Eₙ [eV]
Eₙ [J] (×10⁻²⁰)
de Broglie Wavelength [nm]
Nodes (n−1)
ΔE to next level [eV]
Quantum momentum [kg·m/s]
Wave function ψₙ(x) & probability density |ψₙ|²
Energy levels (n=1-8)
Superposition probability density |Ψ(x,t)|² (quantum beat animation)Click to set observation position
Super
Applications Design foundation for quantum dots and quantum wells (semiconductor lasers) / Tunneling effect evaluation in electron devices / Electron confinement analysis in nanoscale structures. This simple model is essential for understanding thin-film growth simulation and first-principles calculations.
Theory & Key Formulas

Solution of the Schrödinger equation:

$$E_n = \frac{n^2\pi^2\hbar^2}{2mL^2}, \quad \psi_n(x) = \sqrt{\frac{2}{L}}\sin\!\left(\frac{n\pi x}{L}\right)$$

Energy spacing between levels: $\Delta E_{n\to n+1}= E_1(2n+1)$

Superposition time evolution: $\Psi(x,t)=\dfrac{1}{\sqrt{2}}\!\left[\psi_{n_1}e^{-iE_{n_1}t/\hbar}+\psi_{n_2}e^{-iE_{n_2}t/\hbar}\right]$

Beat period: $T = \dfrac{2\pi\hbar}{|E_{n_2}-E_{n_1}|}$

Related Tools

Inclined Plane Motion Simulator
Calculate acceleration, friction force, and normal force for an object on an inclined plane with friction
Offshore Platform Load Calculator
Calculate wave forces and hydrodynamic loads on offshore structures using the Morison equation
Wave Basics Visualizer (Frequency, Wavelength, Wave Speed)
Visualize the core relationships among frequency, wavelength, wave speed, and amplitude.
Room Acoustics and Reverberation Time Calculator (Sabine Formula)
Calculate room reverberation time RT60 with the Sabine and Eyring formulas.

What is a Particle in a Box?

🙋
What exactly is a "particle in a box"? It sounds like a simple toy model.
🎓
Basically, it's the "Hello World" of quantum mechanics! Imagine a particle, like an electron, trapped inside a tiny, one-dimensional space with infinitely high walls—it can't escape. In practice, this simple setup reveals core quantum behaviors like discrete energy levels and wave functions. Try moving the "Box width L" slider above to see how the size of the box changes everything.
🙋
Wait, really? So the particle can only have certain, specific energies? What determines those?
🎓
Exactly! The energy is "quantized." It's set by the particle's mass and the box's width. The key equation is $E_n = \frac{n^2\pi^2\hbar^2}{2mL^2}$, where $n$ is the quantum number (1, 2, 3...). A common case is an electron in a nanoscale box. In the simulator, change the "Mass" multiplier and the width $L$—you'll see the energy levels on the chart spread out or squeeze together dramatically.
🙋
Okay, I see the energy levels. But what about the wave function graphs? They look like weird standing waves inside the box.
🎓
Great observation! That's the particle's probability amplitude, $\psi_n(x)$. It's a standing wave because the particle is confined, just like a guitar string fixed at both ends. The "Quantum number n" slider changes the number of nodes (zero-crossings). For instance, set $n=1$ for the ground state (one hump), or $n=3$ for two nodes. The real magic happens when you switch to the superposition mode and mix two states, like $n_1$ and $n_2$, to see a non-stationary, time-evolving state!

Physical Model & Key Equations

The model solves the time-independent Schrödinger equation for a particle confined between $x=0$ and $x=L$, where the potential $V(x)=0$ inside and is infinite outside. This leads to quantized energy eigenvalues and corresponding wave functions.

$$E_n = \frac{n^2\pi^2\hbar^2}{2mL^2}, \quad \psi_n(x) = \sqrt{\frac{2}{L}}\sin\!\left(\frac{n\pi x}{L}\right)$$

$E_n$: Energy of the $n$-th quantum level.
$n$: Principal quantum number (1, 2, 3...).
$\hbar$: Reduced Planck's constant.
$m$: Mass of the confined particle.
$L$: Width of the box.

For a superposition of two states, the time-dependent wave function is a linear combination. This creates a non-stationary state where the probability density $|\Psi(x,t)|^2$ oscillates in time.

$$\Psi(x,t) = c_1 \psi_{n_1}(x) e^{-iE_{n_1}t/\hbar}+ c_2 \psi_{n_2}(x) e^{-iE_{n_2}t/\hbar}$$

$\Psi(x,t)$: Total time-dependent wave function.
$c_1, c_2$: Complex coefficients (often taken as equal for simplicity).
The observable probability density oscillates with a frequency proportional to the energy difference: $\omega = \Delta E / \hbar$.

Frequently Asked Questions

In an infinite square well potential, the potential energy outside the box is infinite, so the probability of the particle existing outside the box is zero. Therefore, boundary conditions impose ψ=0 at x=0 and x=L. This satisfies the physical requirement that the particle cannot be found outside the box.
Select multiple energy eigenstates (e.g., n=1 and n=2), adjust their coefficients to create a superposition state, and then press the 'Time Evolution' button or move the time slider. You can observe the animation of the probability density of the wave function changing over time.
Solving the Schrödinger equation with infinite well boundary conditions yields a sinusoidal wave function. From the relation between wave number k=nπ/L and energy E=ħ²k²/(2m), it follows that E∝n². This is because larger n increases the number of wave peaks and troughs, resulting in higher kinetic energy.
Normalization is the adjustment of the wave function so that the integral of its absolute square (probability density) over all space equals 1. This ensures the conservation of probability, meaning the particle must exist somewhere. In this simulator, the integral value is displayed below the probability density graph, and you can confirm that it is always 1.

Real-World Applications

Quantum Dots & Semiconductor Lasers: A quantum dot is essentially a 3D "box" for electrons. By controlling its size (like adjusting $L$ in the simulator), engineers can tune the color of light it emits. This is the foundation for high-efficiency displays and medical imaging lasers.

Nanoscale Electronics: As transistors shrink to atomic scales, electrons become confined in channels, behaving like particles in a box. This model helps predict their quantized energy levels and conductivity, which is critical for designing the next generation of chips.

Thin-Film Growth & Analysis: Electrons trapped in ultra-thin metal or semiconductor films exhibit quantized motion perpendicular to the film. This particle-in-a-box behavior affects the film's optical and electronic properties, guiding deposition processes in manufacturing.

Foundational Model for Tunneling: Understanding confinement in an infinite well is the first step to modeling the tunneling effect, where a particle escapes a finite well. This is directly applicable to scanning tunneling microscopes (STMs) and flash memory devices.

Common Misconceptions and Points to Note

When you start using this simulator, there are a few points that are easy to misunderstand. First, avoid over-imagining that "the particle is spread out like a wave." The wave function ψ itself is a complex number representing a "probability amplitude." What is physically observed is the probability density |ψ|², the peak of which merely indicates a region where the particle has a high probability of being found. It does not mean the particle is smeared out like a fuzzy cloud.

Next, pay attention to differences in scale when setting parameters. For example, the worlds of a quantum well with a width L of 1 nm (nanometer) and a macroscopic box of 1 cm are completely different. For an electron (mass m_e) with L=1 nm, the ground state (n=1) energy is about 0.38 eV, but for L=1 cm, it becomes an incredibly small value (about 3.8×10^{-15} eV), making the discreteness of energy levels practically unobservable. If you change the particle to a "proton" in the simulator, you'll notice the energy drops significantly due to the larger mass. It's important to get a feel for this dependence on mass and size, $E_n \propto n^2 / (m L^2)$.

Finally, don't forget that the "infinite well" is an idealized model. In real nanostructures, the potential walls are not infinitely high but have a finite height, so particles can leak out via the tunnel effect. Think of this tool as understanding the first step in quantum confinement.