entropy1 said:
How does one come to this result?
You use the commutator relations
$$[\hat{x},\hat{p}]=\mathrm{i}.$$
Now consider the unitary operator
$$\hat{T}(\xi) = \exp(-\mathrm{i} \hat{p} \xi)$$
and the corresponding transformation of the position operator
$$\hat{X}(\xi)=\hat{T}^{\dagger}(\xi) \hat{x} \hat{T}(\xi).$$
Take the derivative wrt. to ##\xi##
$$\mathrm{d}_{\xi} \hat{X}(\xi)=-\mathrm{i} \hat{T}^{\dagger}(\xi) [\hat{x},\hat{p}] \hat{T}(\xi) = \hat{T}^{\dagger}(\xi) \hat{T}(\xi)=\hat{1}.$$
From this you get by integration
$$\hat{X}(\xi)=\hat{x}+\xi \hat{1}, \qquad (1)$$
where
Now let ##|x \rangle## be a generalized position eigenvector of ##\hat{x}## with eigenvalue ##x## (which you assume to exist). Then define
$$|\xi \rangle=\hat{T}(x)|x \rangle$$
and check what ##\hat{x}## does to it, using (1)
$$\hat{x} |\xi \rangle=\hat{x} \hat{T}(\xi) |x \rangle=\hat{T}(\xi) \hat{X}(\xi) |x \rangle=\hat{T}(\xi)(\hat{x}+\xi) |0 \rangle=(x+\xi) \hat{T}(\xi) |0 \rangle=(x+\xi) |\xi \rangle,$$
i.e., ##|\xi \rangle## is eigenvector of ##\hat{x}## with eigenvalue ##x+\xi##.
This means, if ##x## has a generalized eigenvector with eigenvalue ##x## (which is necessarily real, because ##\hat{x}## is self-adjoint), then ##\hat{x}## as entire ##\mathbb{R}## as a spectrum, and we can write
$$|x \rangle=\hat{T}(x) |0 \rangle.$$
An analogous calculation shows the ##\hat{x}## generates translations in momentum space and thus, if ##\hat{p}## has any generalized eigenstate with a real eigenvalue, then it has entire ##\mathbb{R}## as a spectrum.
Now consider the momentum eigenvectur in position representation:
$$u_p(x)=\langle x|p \rangle=\langle \hat{T}(x) 0|p \rangle=\langle 0|\hat{T}^{\dagger}(x) p \rangle=\exp(\mathrm{i} p x) \langle 0|p \rangle=N_p \exp(\mathrm{i} p x).$$
Now you want to normalize this generalized function to a ##\delta## function in the sense
$$\langle p'|p \rangle=N_{p'}^* N_{p} \int_{\mathbb{R}} \mathrm{d} x \exp[\mathrm{i}(p-p') x]=2 \pi |N_{p}|^2 \delta(p-p') \stackrel{!}{=} \delta(p-p').$$
Thus, up to an irrelevant phase factor, ##N_p=1/\sqrt{2 \pi}##, i.e.,
$$u_p(x)=\frac{1}{\sqrt{2 \pi}} \exp(\mathrm{i} x p),$$
which shows that the position and momentum representation of true Hilbert-space vectors is the Fourier transform to each other and one possible realization of the Hilbert space is as the function space ##\mathrm{L}^2(\mathbb{R},\mathbb{C})## in position or momentum representation ("wave mechanics").
The commutator relations of operators that represent observables thus determine the realization of the quantum-theoretical (rigged) Hilbert space. The commutator relations follow from symmetry principles via the Noether theorem. In our case it was the definition of momentum as the generator of spatial translations. Note that we assumed the existence of a position operator.
The full analysis of the Gailei group, which is the logically complete derivation of how the most general Hilbert space for a particle in non-relativistic QT may look, shows that for any physically interpretable unitary ray representation of the Galilei group, a position operator that fulfills the above commutation relation, exists, and mass is introduced as a socalled central charge of the Lie algebra of the Galilei group. For details, see Ballentine's book on QM.