Show that the allowed energies of a mass $M$ confined in a three-dimensional rectangular rigid box with sides $a, b$, and $c$ are
$$
E=\frac{\hbar^{2} \pi^{2}}{2 M}\left(\frac{n_{x}^{2}}{a^{2}}+\frac{n_{y}^{2}}{b^{2}}+\frac{n_{z}^{2}}{c^{2}}\right)
$$
where the three quantum numbers $n_{x}, n_{y}, n_{z}$ are any three positive integers $(1,2,3, \ldots) .[$ Hint: Use separation of variables, and seek a solution of the form $\psi=X(x) Y(y) Z(z)$. Note that by setting $a=b=c$ one obtains the cubical box of Example 8.2.]