BvU said:
@vanhees71: I have always learned that the position may well be an operator, but that you can not point at a position in the box and say: that's where the particle is located right now. All there is, is a probability density. My estimate is that the poster is hung on a mixup of p, x and n space in a Schroedinger picture and can't move on.
I'm always careful enough to say a self-adjoint operator is representing an observable in the formalism of QT, it's not the observable itself, but that's semantics.
Math is always clear, and an self-adjoint operator is a self-adjoint operator by definition, and there's no exception for (admittedly academic and oversimplified) models like the box with rigid boundary conditions. An operator has a domain and a co-domain, and the definition of a self-adjoint operator implies that the co-domain must be the same as its domain.
For the rigid 1D box the Hilbert space is ##\mathrm{L}^2([0,L])##. The position operator is then defined as in infinite space by ##\hat{x} \psi(x)=x \psi(x)##. It's obviously Hermitean, i.e., ##\langle \psi|\hat{x} \phi \rangle=\langle \hat{x} \psi|\phi \rangle## for all wave functions, for which ##\hat{x} \psi(x)## and ##\hat{x} \phi(x)## are again square-integrable. For the rigid boundary conditions, ##\psi(0)=\psi(L)=0##, obviously also ##\hat{x}\psi(x)## is again fulfilling these boundary conditions, and thus the so defined position operator is self-adjoint.
The putative momentum operator ##\hat{p} \psi(x)=-\mathrm{i} \partial_x \psi(x)## is also Hermitean (which you can easily check by calculating the scalar products explicitly), but it's not self-adjoint. If this were the case, the eigenvectors which are ##\sin(k x)## and ##\cos(k x)## with ##k## chosen for both cases such as to fulfill the boundary conditions, should have the same co-domain as the domain, but that's not the case, because the derivative of the eigenvectors does not fulfill the boundary conditions and thus is outside of the Hilbert space.
What's, however, self-adjoint is the Hamiltonian, i.e., ##\hat{H}=-\hbar^2 \partial_x^2/(2m)##, and thus you have a well-defined position opreator and a well defined Hamiltonian, and that's enough to justify this nice example for eigen-value problems. Nevertheless the corresponding eigenstates are eigenstates of the Hamiltonian not of the only Hermitean momentum operator, and there is no true momentum observable for this example.