One-dimensional potential energy function $$W_{\text{pot}}(x)$$ depends on the location $$x$$. If a quantum mechanical particle is confined in the region between $$x_1$$ and $$x_2$$, its total energy $$W_n$$ is always quantized. Then only energies $$W_0$$, $$W_1$$, $$W_2$$ and so on are allowed, but no energy values in between. For each total energy of the particle there is the corresponding wave function $$\mathit{\Psi}_0$$ (ground state), $$\mathit{\Psi}_1$$, $$\mathit{\Psi}_2$$ and so on (excited states).