In Griffiths quantum mechanics, There is a problem that
"Find the momentum-space wave function $\varphi(p,t)$ for the $n$th stationary state of the infinite square well."
The $n$th stationary state has only one energy value: $E= n^2h^2/(8mL^2)$. First, I thought that the momentum $p$ can only be $\pm \sqrt{2mE}$ because of $E=\frac{p^2}{2m}$. Second, I use de Broglie wavelength. In $n$th stationary state, $\lambda=2L/n$ and $p=h/\lambda$. So I thought $p$ only can be $\pm nh/2L$, and those are same with $\pm\sqrt{2mE}$.
But, It was wrong, If I use Fourier transforms to find the momentum-space wave function, $p$ can be every real numbers because $n$th stationary state is not eigenfunction of momentum! Why is it possible? I couldn't find physical reason of that. What is my fault in my first and second opinion?
In summary : When we measure energy, the possible number of the momentum is determined to be one(or two because of plus-minus), and when we measure the momentum, the possible number of the energy is infinite? What is my error?