= Solution
Use the unitary position-to-momentum <Fourier transform> $\phi(p)=(2\pi\hbar)^{-1/2}\int\psi(x)e^{-ipx/\hbar}\,dx$. Integration gives
$$
\phi(p,0)=\frac1{\sqrt{2\pi\hbar a}}\frac{2\hbar}{p}\sin\!\left(\frac{pa}{2\hbar}\right)=\boxed{\sqrt{\frac{a}{2\pi\hbar}}\,\operatorname{sinc}\!\left(\frac{pa}{2\hbar}\right)},
$$
where $\operatorname{sinc}u=\sin u/u$ with its continuous value one at zero. The amplitude is real and even, with central maximum $\sqrt{a/(2\pi\hbar)}$, zeros at $p=2n\pi\hbar/a$ for nonzero integer $n$, and alternating-sign sidelobes decaying as $1/|p|$.
\Image[/past-exam-of-the-physics-a-course-of-the-university-of-cambridge/2016/paper-1-top-hat-momentum.png]
{title=A finite rectangular position amplitude gives a sinc momentum amplitude and a sinc-squared momentum density}
{source=paper-1-top-hat-momentum.py}
The <probability density> is $|\phi|^2$, not the signed <Sinc function> amplitude. Its integral is one by the unitarity of the <Fourier transform>.
Back to article page