Particle in a Box Problems: Energy Levels, Normalization, ⟨x⟩
Solve the infinite square well step by step: energy levels, normalization, expectation values, probabilities and checks, with an electron in a 1.00 nm box.
Professor Eric Editorial · Nov 29, 2026 · 7 min read
In this article
- What are the conditions of this problem?
- How do you solve for the energy levels?
- How do you normalize the wave function?
- What numbers do you get for an electron in a 1.00 nm well?
- How do you find expectation values and probabilities?
- How do you test the answer with limiting cases?
- What assignments does this help with, and what help is allowed?
- Infinite well checklist
- Frequently asked questions
- Try a variation
The infinite square well is the first quantum system most physics students solve completely. It is simple enough to do by hand, and yet it contains quantization, normalization, probability and the uncertainty principle in one problem.
What are the conditions of this problem?
Standard setup: a single particle of mass m in one dimension. The potential is zero for 0 < x < L and infinite outside, so the wave function must be zero at x = 0 and x = L and everywhere outside. The state is a stationary state, and the particle is non-relativistic with no spin effects. Courses that use this problem include modern physics (calculus-based), introductory quantum mechanics and chemistry courses at the college level. It isn't part of AP Physics. AP is a trademark of the College Board, which isn't affiliated with Professor Eric.
How do you solve for the energy levels?
Inside the well, the time-independent Schrödinger equation is
−(ħ²/2m) d²ψ/dx² = E ψ
Rewrite it as ψ″ = −k² ψ with k² = 2mE/ħ². The general solution is ψ = A sin kx + B cos kx. The boundary condition ψ(0) = 0 forces B = 0. The condition ψ(L) = 0 requires sin kL = 0, so kL = nπ and k = nπ/L. Substituting back:
Eₙ = n² π² ħ² / (2 m L²)
Only these energies are allowed, and n = 0 is excluded because it gives ψ = 0 everywhere. The lowest energy, E₁, is not zero. That is the zero-point energy and follows from confining the particle.
How do you normalize the wave function?
Require ∫₀ᴸ |ψ|² dx = 1 with ψ = A sin(nπx/L). Since the average of sin² over the well is ½, the integral is A² L/2, so A = √(2/L). A numerical integral confirms this for n = 1, 2 and 3 and for two widths, L = 1.00 and L = 2.70 (in arbitrary length units). Each normalization integral came out as 1.000000. I also checked orthogonality: the overlap integral of two different states came out as zero to within about 10⁻¹⁸. A finite-difference second derivative also confirms that ψ″/ψ equals −(nπ/L)², as the equation requires.
What numbers do you get for an electron in a 1.00 nm well?
Using ħ = 1.0546 × 10⁻³⁴ J·s and m = 9.109 × 10⁻³¹ kg:
E₁ = π² ħ² / (2 m L²) = 0.376 eV
Then E₂ = 4E₁ = 1.50 eV and E₃ = 9E₁ = 3.38 eV. The energy of the n = 2 to n = 1 transition is E₂ − E₁ = 3E₁ = 1.13 eV. The photon wavelength is λ = hc/ΔE = 1240 eV·nm / 1.128 eV = 1.10 × 10³ nm, which is in the infrared.
Check. Halving the width multiplies every energy by 4, since E ∝ 1/L². For L = 0.50 nm, E₁ = 1.50 eV, which is the same as E₂ for the wider well. Plausible scale: electron energies of order an electronvolt for atomic-scale confinement is right.
How do you find expectation values and probabilities?
The expected position is ⟨x⟩ = ∫₀ᴸ x |ψₙ|² dx = L/2 for every n, which matches the symmetry of |ψ|² about the center. The mean square position is
⟨x²⟩ = L² (1/3 − 1/(2n²π²))
For n = 1 this is 0.2827 L², and for n = 2 it is 0.3207 L². Numerical integration reproduced these to many digits for both widths. The uncertainty in position is Δx = √(⟨x²⟩ − ⟨x⟩²), which for n = 1 is 0.1808 L.
For momentum, ⟨p⟩ = 0 by symmetry, and since the energy is entirely kinetic, ⟨p²⟩ = 2mE = (nπħ/L)². So Δp = nπħ/L. For n = 1, Δx Δp = 0.1808 π ħ = 0.568 ħ, which satisfies the uncertainty principle Δx Δp ≥ ħ/2. For n = 2 the product is 1.67 ħ, also above the bound.
Probabilities. The probability of finding the particle in the left quarter, 0 < x < L/4, is the integral of |ψ|² over that region. For n = 1 this is 1/4 − 1/(2π) = 0.0908, much less than the classical 0.25 because the wave function is small near the walls. For n = 2 it is exactly 0.250. The probability of being in the middle half for n = 1 is 1/2 + 1/π = 0.818.
How do you test the answer with limiting cases?
- Large n. As n grows, the probability density averages out to the classical uniform distribution. For n = 50, the left-quarter probability from the integral is 0.250, matching the classical value. This is the correspondence principle.
- Large L or large m. The levels crowd together as L or m increases (Eₙ ∝ 1/(mL²)), and the spacing becomes negligible, so quantization becomes unobservable for macroscopic objects.
- Units. ħ²/(m L²) has units of J²·s²/(kg·m²) = J. Energy comes out in joules, as it should.
- Zero probability at the walls. ψ(0) = ψ(L) = 0 by construction, so a result that is non-zero at a wall means an algebra error.
What assignments does this help with, and what help is allowed?
Particle-in-a-box problems appear on modern physics and quantum mechanics problem sets, on exams and in computational projects that solve the Schrödinger equation numerically. Allowed help can include a model solution to a similar problem, such as a finite well or a box with a different width, feedback on your own derivation and tutoring on integrals and boundary conditions.
Follow your school's honor code and your instructor's rules on outside help, and submit only your own work. We don't do graded online homework, quizzes, labs or exams. See our physics assignment help page.
Infinite well checklist
Your checklist
0 of 7 done
Frequently asked questions
Why can't the energy be zero?
A zero energy would require a constant wave function, which can't satisfy ψ = 0 at both walls unless it is zero everywhere. Confinement forces curvature in ψ, and curvature means kinetic energy.
Why is ⟨x⟩ always L/2?
For every stationary state in the symmetric well, |ψ|² is symmetric about the center, so the average position is the center. That doesn't mean the particle is likely to be found there. For n = 2, the probability density is zero at the center.
How do I find the probability in a region?
Integrate |ψ|² over that region, using the normalized wave function. Check that integrating over the whole well gives 1.
Does the particle move back and forth?
Not in a stationary state. The probability density doesn't change in time. Motion appears only in superpositions of different energies.
Try a variation
Compute the probability of finding the particle in the middle third of the well for n = 1, n = 2 and n = 3, then check that for very large n it approaches one third. For feedback on your own working, a tutor or a model solution to a similar problem can help.