Excited State of an Electron in a 2D Box An electron in a 2D infinite potential well needs to absorb EM wave with wave length 4040 nm to be excited from $n=2$ to $n=3$. What is the length of the box if this potential well is a square($L_x=L_y$)?
My solution:
$$E_{n_x,n_y}=\frac{\pi^2\hbar^2}{2mL^2}(n_x^2+n_y^2)$$
For $n=2$, the energy should be:
$$\frac{\pi^2\hbar^2}{2mL^2}\times(2^2+0^2)$$
, and for $n=3$, the energy should be:
$$\frac{\pi^2\hbar^2}{2mL^2}\times(3^2+0^2)$$
So:
$$\frac{hc}{\lambda}=\Delta E=\frac{5\pi^2\hbar^2}{2mL^2}$$
$$L=\sqrt{\frac{5\pi\hbar}{4mc}\lambda}=2.47 nm$$
What's wrong with my solution, because the answer is 3.5nm.
 A: For a 2-D well the energy is given by the following expression:

$$\boxed{E=\frac{\hbar^{2}\pi^{2}}{2m}\left(\frac{n_{x}^{2}}{L_{x}}+\frac{n_{y}^{2}}{L_{y}}\right)}$$

Since this is a case of a square well $L_{x}=L_{y}=L$. 
When the electron absorbs an EM wave and gets excited it jumps from its ground state of $n=2$ to an excited state of $n=3$, as mentioned in the question. What is important to know is that, from the question's perspective the electron in the $n=2$ state has the quantum numbers, $n_{x}=n_{y}=2$ describing it. For an electron there needs to be 4 quantum numbers describing it, and as you may know, even if $n_{x}=n_{y}=n_{z}$ for two electrons their spin quantum number must be different, i.e. $s=+\frac{1}{2} or -\frac{1}{2}$, due to the Pauli exclusion principle.
So the answer:
For $n=2$: $$E=\frac{\hbar^{2}\pi^{2}}{2mL^2}(2^2+2^2)\tag{1}$$
For $n=3$: $$E=\frac{\hbar^{2}\pi^{2}}{2mL^2}(3^2+3^2)\tag{2}$$
$$(1)-(2)=\frac{\hbar^{2}\pi^{2}}{2mL^2}(10)=\Delta E=\frac{hc}{\lambda}$$
Hence, $$L=3.499198x10^{-9}m\approx 3.5nm$$
