Skip to main content

Expanding an arbitrary state on the eigenbasis

Any starting shape becomes a list of coefficients.

The rest of this section works on a list of numbers rather than a curve: time evolution gives each cₙ its own phase, and an energy measurement returns Eₙ with probability |cₙ|². This lesson builds that list for any starting shape in the well, mostly without brute-force integrals, and shows how to read from the list whether the arithmetic and the state are sound.

Build the model

What a state does at the walls and at its corners decides how fast its coefficients fall.

1The big idea

Once the stationary states of the well are known, any starting shape Ψ(x,0) between the walls can be traded for a list of numbers: Ψ = Σ cₙψₙ with ψₙ = √(2/L) sin(nπx/L) and cₙ = ∫₀ᴸ ψₙ*Ψ(x,0) dx. Completeness (UQMI-06.05) guarantees the list exists, and orthonormality makes each entry one integral. The star does nothing here, because every ψₙ is real, but it stays: Ψ may be complex, and in the complex bases still to come dropping it returns the wrong coefficient. Most of the integrals need never be done. A trigonometric shape expands by identity; the reflection x → L − x sends ψₙ to (−1)(n+1)ψₙ, so a shape even about the centre has only odd n and an odd one only even n; and integrating by parts turns cₙ into a series in the wall values of Ψ and its even derivatives, which stops after a few terms for a polynomial. That series also explains the tail of the list. A state that meets both walls at zero loses the 1/n term: its coefficients fall as 1/n³ or faster if it is smooth and as 1/n² if it has a corner. A trial function that stays nonzero at a wall, a constant for instance, keeps a 1/n tail. It still expands, with Σ|cₙ|² = 1, but not uniformly: every partial sum is zero at the wall and overshoots beside it by about 18% of the wall value, and Σ n²|cₙ|² diverges, which is the list reporting a shape the well cannot hold at finite energy.

2In one sentence

Expanding a state on the eigenbasis means writing the starting wavefunction as Ψ(x,0) = Σ cₙψₙ(x), where each dimensionless cₙ = ∫₀ᴸ ψₙ*Ψ(x,0) dx measures how much of the nth stationary state of the well the shape contains.

Example. The smooth bump Ψ = √(8/(3L)) sin²(πx/L) has c₁ = 0.980, c₃ = −0.196, c₅ = −0.028 and no even-n terms at all, and its weights 0.9607 + 0.0384 + 0.0008 already reach 0.9999 of the required 1.

3Scale out the width and let the dimensions check you

Put ψₙ = √(2/L) sin(nπx/L) into the overlap and change variable to u = x/L. With f(u) = √L Ψ(uL, 0), the dimensionless shape of the state, cₙ = √2 ∫₀¹ sin(nπu) f(u) du. The width has gone: a coefficient depends on the shape of the state, never on the size of the well, so the tent of the Medium example below has c₁ = 0.967 in a 1.20 nm well and in a 1.20 μm one. Two checks come free. A coefficient that still carries a power of L once the integral is done is wrong, since ψₙ* and Ψ each carry m(−1/2) and dx carries m. And the limiting case Ψ = ψₘ must return cₘ = 1 and every other cₙ = 0, which is orthonormality (UQMI-06.05) read backwards. What survives the scaling is how the shape sits in the box: its symmetry about the centre, what it does at the walls, and where it has corners. The rest of this lesson reads the coefficients off those three features.

4Let the centre's symmetry and trigonometry do half the work

Reflect the well about its centre, x → L − x. Since sin(nπ − θ) = (−1)(n+1) sin θ, the states ψ₁, ψ₃, ψ₅, … are even about x = L/2 and ψ₂, ψ₄, … are odd. An integrand odd about the centre integrates to zero, so a Ψ even about L/2 has no even-n coefficients and a Ψ odd about L/2 has no odd-n ones. A shape with no symmetry splits into ½[Ψ(x) + Ψ(L − x)], which feeds only odd n, and ½[Ψ(x) − Ψ(L − x)], which feeds only even n. Before integrating at all, look for trigonometry, because products of sines and cosines of πx/L fold into single sines. The double hump sin(πx/L) cos²(πx/L) equals (sin θ + sin 3θ)/4 with θ = πx/L, so once normalised it is (ψ₁ + ψ₃)/√2: c₁ = c₃ = 0.707 and every other cₙ = 0, with no integral done. The two rules check each other, since the hump is even about the centre and only odd n appeared.

5Integrate by parts until only the walls are left

When Ψ is smooth inside the well, integrate the overlap by parts twice. With k = nπ/L, ∫₀ᴸ sin(kx) Ψ dx = [Ψ(0) − (−1)ⁿΨ(L)]/k − (1/k²) ∫₀ᴸ sin(kx) Ψ″ dx, the other boundary term dying because sin(nπ) = 0. Each further round swaps Ψ for its second derivative and costs a factor 1/k², so the large-n coefficients are fixed by what Ψ and its even derivatives do at the two walls, and for a polynomial the series stops and is exact. Take Ψ = A x²(L − x), a state leaning towards the right wall, normalised by A = √(105/L⁷). It vanishes at both walls, and Ψ″ = A(2L − 6x) is 2AL at x = 0 and −4AL at x = L, so cₙ = 2√210/(nπ)³ for odd n and −6√210/(nπ)³ for even n: c₁ = 0.935, c₂ = −0.351, c₃ = 0.0346, c₄ = −0.0438. The even terms exist because the shape is lopsided, and c₂ is negative because ψ₂ is positive in the left half, where this state is thin. Two terms already carry 0.9966 of the weight.

6A corner inside the well, and the tail it leaves

A corner at x = a, where the slope jumps by ΔΨ′, puts a δ function into Ψ″, and the by-parts series picks it up as a term −√(2/L) ΔΨ′ (L/nπ)² sin(nπa/L). That term falls as 1/n², and it vanishes for every n whose ψₙ has a node at a: a tent peaked at L/3 has no c₃, c₆ or c₉, just as a string plucked at a third of its length sounds no third, sixth or ninth harmonic. Read in reverse, the decay of the list classifies the shape. Coefficients falling as 1/n³ belong to a state smooth across the well that meets both walls at zero; 1/n² signals a corner; 1/n means Ψ misses a wall, because the j = 0 wall term survives. That doubles as a check on algebra: multiply the computed cₙ by n, n² or n³ and the product should reproduce the wall and corner terms, a constant for each parity of n or a multiple of sin(nπa/L), rather than drift. It also sets the truncation. The weight beyond N, 1 − Σ|cₙ|² over n ≤ N, is exactly the mean-square error ∫|Ψ − SN|² dx of the N-term sum: 3.4 × 10⁻³ at N = 2 for x²(L − x), and 8.9 × 10⁻⁴ at N = 6 for the tent.

7A trial function that ignores the walls still expands

Nothing in cₙ = ∫ψₙ*Ψ dx asks Ψ to vanish at x = 0 or x = L, so a trial shape that does not, a constant or a bump standing on a floor, still has a list with Σ|cₙ|² = 1. The price is paid point by point. Every ψₙ is zero at both walls, so every partial sum SN is too, while Ψ is not; beside each wall SN overshoots Ψ by about 0.18 of the wall value, at a distance near L/N, and more terms push the overshoot towards the wall without lowering it. A floor also wins the tail, however thin it is. Stand the smooth bump 6u(1 − u) on a floor just high enough that the wall value is one tenth of the mean: at n = 3 the bump contributes 0.034 to c₃ and the floor 0.028, but at n = 5 the floor's 0.017 is more than twice the bump's 0.0073, and from there the list falls as 1/n. Since Eₙ grows as n², Σ n²|cₙ|² then diverges. The trial function expands perfectly well yet has no finite energy, which is UQMI-06.01's verdict on a nonzero wall value, now read off the coefficients.

8

Key equations

What each relation says, and the units it is written in.

Expansion of the starting state

Ψ(x,0) = Σₙ cₙ √(2/L) sin(nπx/L), n = 1, 2, 3, …

Holds for any square-integrable shape between the walls, a physical state or not, in the mean-square sense. The list of cₙ then carries everything about Ψ.

Ψ in m(−1/2), well width L in m; each cₙ is dimensionless and in general complex.

One coefficient, in the scaled variable u = x/L

cₙ = ∫₀ᴸ ψₙ* Ψ(x,0) dx = √2 ∫₀¹ sin(nπu) f(u) du

L cancels, so cₙ depends only on the shape of Ψ, never on the size of the well: a coefficient that still carries L is wrong.

f(u) = √L Ψ(uL, 0) is the dimensionless shape. The star stays on ψₙ, even though ψₙ is real here.

Normalisation carried by the list

Σₙ |cₙ|² = ∫₀ᴸ |Ψ(x,0)|² dx = 1

The checksum on every expansion. It is blind to the phases of the cₙ, so it catches a wrong factor but not a misplaced star.

Dimensionless throughout. Partial sums over n ≤ N rise towards 1 and can never pass it.

Coefficients from the walls, by parts

cₙ = √(2/L) Σⱼ (−1)ʲ [Ψ(2j)(0) − (−1)ⁿ Ψ(2j)(L)] (L/nπ)(2j+1)

Stops after a few terms for a polynomial. Missing a wall keeps the j = 0 term and a 1/n tail; a shape meeting both walls at zero falls as 1/n³ or faster.

j = 0, 1, 2, …; Ψ(2j) is the 2jth x-derivative, in m(−1/2−2j). Exact for a polynomial, where the sum stops; for other smooth Ψ it is a large-n expansion that can diverge at small n.

A corner at x = a adds

Δcₙ = −√(2/L) ΔΨ′ (L/nπ)² sin(nπa/L)

Falls as 1/n² and vanishes for every n whose ψₙ has a node at a: the missing harmonics of a string plucked at a.

ΔΨ′ = Ψ′(a⁺) − Ψ′(a⁻), the slope jump in m(−3/2); a in m. Add it to the terms from the smooth pieces.

Overshoot beside a wall that Ψ misses

peak of (SN − Ψ) → 0.179 |Ψ(wall)| as N → ∞

More terms squeeze the overshoot towards the wall without lowering it, while ∫|Ψ − SN|² dx still falls to zero.

SN is the sum through n = N, zero at the wall itself; the peak sits about L/N in from the wall.

9

Interactive lab

Change one variable. Predict first, then read the result.

Controls

Try this. Start at b = 1, the flat trial function, and raise N from 7 to 15: the kept weight creeps only from 0.950 to 0.975, the solid curve still leaves each wall at zero and overshoots beside it by about 18%, and c₃ ÷ c₁ stays 1/3. Then drag b to 0: n = 1 and 3 already fit, and c₃ ÷ c₁ falls to 1/27.

Live results

GROUND-STATE WEIGHT |c₁|²
0.8106
RATIO c₃ ÷ c₁
0.333
LAST KEPT cN
0.1286
WALL VALUE √L Ψ(0)
1.000
Interactive modelA trial Ψ(x,0) in a well of width L: a blend of the smooth bump 6u(1 − u), with u = x/L, and a flat floor, both of mean 1, weighted so that at each wall the shape is 1.00 times its mean. Dashed: the normalised trial function. Solid: its expansion kept to n ≤ 7, zero at both walls for every N. Bars: the coefficients cₙ, odd n only because the shape is even about L/2.dashed: trial Ψ(x,0), √L Ψ = 1.00 at wallssolid: sum to n = 7, zero at both wallsx = 0x = L1/√Lcₙ, n = 1 to 15 left to right (dashed: dropped)kept Σ|cₙ|² = 0.9496
A trial Ψ(x,0) in a well of width L: a blend of the smooth bump 6u(1 − u), with u = x/L, and a flat floor, both of mean 1, weighted so that at each wall the shape is 1.00 times its mean. Dashed: the normalised trial function. Solid: its expansion kept to n ≤ 7, zero at both walls for every N. Bars: the coefficients cₙ, odd n only because the shape is even about L/2.
10

Catch the common trap

The mistake this lesson is built to prevent.

Because every ψₙ in the well is real, students treat the star in cₙ = ∫ψₙ*Ψ dx as decoration and let it drift onto Ψ. For a real Ψ nothing changes; for a complex one, ∫ψₙΨ* dx returns cₙ*, and nothing on the list looks wrong. Every |cₙ|² is unchanged, so Σ|cₙ|² = 1 still checks out. Yet Σ cₙ*ψₙ builds Ψ*, a different state with the same density at t = 0: with a real Hamiltonian Ψ* evolves as Ψ run backwards, so a packet kicked towards the right wall is rebuilt heading for the left, and the relative phases that UQMI-06.08 turns into motion come out reversed. The star sits on the basis function because cₙ is the component of Ψ along ψₙ. On a ring, for spin, or in the momentum basis, where the basis functions are complex, dropping it gives the wrong coefficients outright.

Test it: what changes?

Raise wall value b from 0 · fixed N
  • c₃ ÷ c₁ rises from 1/27 towards 1/3
  • √L Ψ(0) grows from zero
  • Tail turns 1/n, so Σ n²|cₙ|² diverges
  • Partial sums still vanish at both walls
Raise N · flat trial function (b = 1)
  • Kept weight creeps up only slowly towards 1
  • Overshoot beside each wall stays about 18%
  • Overshoot squeezes towards the walls
  • c₃ ÷ c₁ stays 1/3
11

Practice & worked examples

Three tiers. Try each before opening the solution.

EasyExample 1

An electron in a well of width L = 0.80 nm starts in Ψ(x,0) = A sin(πx/L)[3 + 4i cos(πx/L)]. Expand it on ψₙ = √(2/L) sin(nπx/L), fix A from the coefficients, confirm c₂ by the overlap integral, and say what a student who puts the star on Ψ instead would get.

View solution →
  1. With θ = πx/L, sin θ cos θ = ½ sin 2θ, so Ψ = 3A sin θ + 2iA sin 2θ. Each sine is √(L/2) times a ψₙ, so Ψ = A√(L/2)(3ψ₁ + 2iψ₂): c₁ = 3A√(L/2), c₂ = 2iA√(L/2), and every other cₙ = 0.
  2. Normalise on the list: Σ|cₙ|² = (L/2)A²(9 + 4) = 13A²L/2 = 1, so A = √(2/(13L)) = √(2/(10.4 nm)) = 0.439 nm(−1/2). Then c₁ = 3/√13 = 0.832 and c₂ = 2i/√13 = 0.555i, pure numbers with no trace of L.
  3. Overlap for c₂, star on ψ₂: the 3A sin θ part is orthogonal to ψ₂ (UQMI-06.05), and the rest gives 2iA√(2/L) ∫₀ᴸ sin²(2πx/L) dx = 2iA√(2/L)(L/2) = 2iA√(L/2) = 0.555i. Units: m(−1/2) × m(−1/2) × m, dimensionless.
  4. Direct check: |3 + 4i cos θ|² = 9 + 16 cos²θ, and ∫₀ᴸ sin²θ (9 + 16 cos²θ) dx = 9L/2 + 16L/8 = 13L/2, so ∫|Ψ|² dx = 13A²L/2 = 1, the value the list gave.
  5. Star on Ψ: ∫ψ₂Ψ* dx = −0.555i = c₂*, while c₁ stays 0.832. The weights 9/13 = 0.692 and 4/13 = 0.308 are unchanged and still sum to 1, but the list now builds Ψ* = A sin θ (3 − 4i cos θ), the same density at t = 0 with the opposite relative phase.

Answer. A = 0.439 nm(−1/2); c₁ = 0.832, c₂ = 0.555i, all other cₙ = 0, weights 0.692 + 0.308 = 1. The misplaced star gives c₂ = −0.555i and silently describes Ψ*.

MediumExample 2

A trial state in a well of width L = 1.20 nm is a tent: Ψ rises linearly from zero at x = 0 to a peak at x = a = 0.40 nm and falls linearly to zero at x = L. Normalise it, find cₙ from its corner, list c₁ to c₆, explain the zeros, and check the list three ways.

View solution →
  1. Normalise with peak height h: ∫|Ψ|² dx = h²a/3 + h²(L − a)/3 = h²L/3 = 1, so h = √(3/L) = 1.581 nm(−1/2).
  2. The slope is h/a = 3.953 nm(−3/2) on the left and −h/(L − a) = −1.976 nm(−3/2) on the right, a jump ΔΨ′ = −5.929 nm(−3/2) at x = a. Ψ vanishes at both walls and is straight elsewhere, so the corner term is the whole answer: cₙ = −√(2/L) ΔΨ′ (L/nπ)² sin(nπa/L).
  3. Numbers: √(2/L) = 1.291 nm(−1/2) and (L/π)² = 0.1459 nm², so cₙ = 1.117 sin(nπ/3)/n², dimensionless, and equal to 9√6/(2π²) × sin(nπ/3)/n² for any L. Hence c₁ = 0.967, c₂ = 0.242, c₃ = 0, c₄ = −0.0605, c₅ = −0.0387, c₆ = 0.
  4. The zeros: ψ₃, ψ₆, ψ₉, … have a node at x = L/3, the only place Ψ″ is nonzero, so they cannot feel the corner. The classical correspondence is exact: a string plucked at a third of its length has no third or sixth harmonic.
  5. Normalisation: the weights 0.9355, 0.0585, 0, 0.0037, 0.0015, 0 reach 0.9991 by n = 6, and exactly Σ|cₙ|² = (243/(2π⁴)) Σ sin²(nπ/3)/n⁴ = (243/(2π⁴)) × (3/4)(80/81)(π⁴/90) = 1.
  6. Decay and limit: cₙ ∝ 1/n², a corner with no wall term, so Σ n²|cₙ|² = 27/(2π²) = 1.37 converges and the tent is a state of finite energy. At the peak the sum creeps up without overshooting: 1.48, 1.60 and 1.71 for N = 2, 6, 30, against √3 = 1.73 in units of 1/√L. Moving a to L/2 turns the factor into sin(nπ/2), which removes every even n.

Answer. h = 1.581 nm(−1/2); cₙ = 1.117 sin(nπ/3)/n²: c₁ to c₆ = 0.967, 0.242, 0, −0.0605, −0.0387, 0, with weights summing to exactly 1.

HardExample 3

An electron is in the ground state of a well of width L = 1.00 nm when a brief uniform force delivers momentum p₀ = 2πħ/L, multiplying the wavefunction by e(ip₀x/ħ): Ψ(x,0) = √(2/L) sin(πx/L) e(2πix/L). Find every cₙ, check Σ|cₙ|² = 1, and check the kick's energy using Σ n²|cₙ|² = (L/π)² ∫₀ᴸ |∂Ψ/∂x|² dx, valid when Ψ vanishes at both walls.

View solution →
  1. Split with Euler's formula, θ = πx/L: Ψ = √(2/L)[sin θ cos 2θ + i sin θ sin 2θ]. Under x → L − x the real part is even and the imaginary part odd, so odd-n coefficients are real and even-n ones imaginary.
  2. Real part by identity: sin θ cos 2θ = ½(sin 3θ − sin θ), so c₁ = −½ and c₃ = +½, and every other odd cₙ = 0.
  3. Imaginary part by overlap, star on ψₙ: cₙ = (i/π) ∫₀π sin nθ (cos θ − cos 3θ) dθ, using sin θ sin 2θ = ½(cos θ − cos 3θ). For even n, ∫₀π sin nθ cos mθ dθ = 2n/(n² − m²) with m odd, so cₙ = −16in/(π(n² − 1)(n² − 9)): c₂ = 0.679i, c₄ = −0.194i, c₆ = −0.0323i, c₈ = −0.0118i.
  4. Normalisation: the odd terms give 0.25 + 0.25 = 0.500 and the even terms 0.4611 + 0.0376 + 0.0010 + 0.0001 + …, which must total ½ since ∫(2/L) sin²θ sin²2θ dx = ½. The list reaches 0.99995 by n = 8.
  5. Energy: ∂Ψ/∂x = e(ik₀x)(ψ₁′ + ik₀ψ₁) with k₀ = 2π/L, so |∂Ψ/∂x|² = ψ₁′² + k₀²ψ₁² and Σ n²|cₙ|² = (L/π)²[(π/L)² + (2π/L)²] = 5; the list gives 4.947 by n = 4 and 4.993 by n = 8. With E₁ = 0.376 eV, Σ Eₙ|cₙ|² = 5E₁ = 1.88 eV = E₁ + p₀²/2m, the classical kick energy 1.50 eV added to a state with zero mean momentum.
  6. Star on Ψ: the odd cₙ are real and survive, but every even cₙ flips sign. That list builds ψ₁e(−2πix/L), the same kick towards the other wall, and both sums above pass unchanged, so only the placement of the star protects the direction.

Answer. c₁ = −½, c₃ = ½, other odd cₙ = 0; even cₙ = −16in/(π(n² − 1)(n² − 9)) = 0.679i, −0.194i, −0.0323i, …; Σ|cₙ|² = 1 and Σ Eₙ|cₙ|² = 5E₁ = 1.88 eV = E₁ + p₀²/2m.

12

Quick check

Choose an answer, then check it. Explain to yourself why the others fail.

A normalised trial function in a well of width L has c₁ = 0.9735, c₃ = 0.1662, c₅ = 0.0921, c₇ = 0.0643 and every even cₙ = 0, and n × cₙ settles towards 0.44 as n grows. What does this list say about Ψ(x,0)?
13

Key takeaway

cₙ = ∫₀ᴸ ψₙ*Ψ(x,0) dx, with the star on ψₙ.

Before integrating, use symmetry about L/2 (even shapes feed only odd n), trigonometric identities, and integration by parts down to the wall values. Check Σ|cₙ|² = 1 and the tail: 1/n³ or faster for smooth shapes meeting both walls at zero, 1/n² for a corner, 1/n for a missed wall.

Next: Measurement probabilities and what a superposition is not →

Extra challenging questions

Connect several ideas, explore supplied data, and compare your reasoning with a worked solution.