One dimension:

Time-independent Schroedinger equation:
 (-ħ2/(2m))∂2ψ(x)/∂x2 + U(x)ψ(x)  = Eψ(x).
The solutions of the time-independent Schroedinger equations are wave functions of particles with a well-defined energy E (stationary states).
ψ(x,t) = ψ(x) exp(-iEt/ħ).

Infinite square well: 
ψn(x)  = (2/L)1/2sin(nπx/L), n = 1, 2, 3, ... .
En = n2π2ħ2/(2mL2).

Harmonic well:
En = (n + 1/2)ħω = (n + 1/2)hf, n = 0, 1, 2, ... .