I am considering a particle of mass m in a symmetric infinite square well of width a in the fundamental state.
$$V(x)= \begin{cases} 0 & \mbox{$|x|<\frac{a}{2}$} \\ \infty & \mbox{otherwise} \end{cases}$$
I want to know what values are obtained from the measurement of energy $E$, position $x$ and impulse $p$ and the corresponding probabilities.
So I did:
$$\psi_{n=1}(x)=\sqrt{\frac{2}{a}}\cos\left(\frac{\pi}{a}x\right)$$ $$E_{1}=\frac{\hbar^2\pi^2}{2ma^2} \,\,\,\,\,\,\,\,\,\,\ P(E_1)=100\%$$ I can not calculate the eigenvalues of the operator position that I imagine is a continuous set of values in the interval $\left[ -\frac{a}{2},\frac{a}{2} \right]$.
Those that I have considered up until now are the eigenfunctions of the Hamiltonian and not of the position operator so I do not think it makes sense:
$$\hat{x}| 1\rangle=\sqrt{\frac{2}{a}}\int_{-\frac{a}{2}}^{\frac{a}{2}}x\cos\left(\frac{\pi}{a}x\right)dx=0$$ However I do not know how to do it or even for the momentum. I also have a suggestion that to calculate the probability of the momentum it is sufficient to calculate the wave function in the space of the impulses, but I honestly can not understand it