Given the S.E $$ \Psi(x,0) = \begin{cases} A,&0 \leq x \leq \frac{a}{2}, \\ 0,& \rm elsewhere \end{cases} $$ I'm supposed to find the uncertainty product at $t=0$. However since the equation is constant it doesn't seem to satisfy the uncertainty principle.
For the expectation value of $p$ and $p^{2}$ i get $$ \langle p \rangle = - i \hbar |A|^{2}d \int_{0}^{\frac{a}{2}}\frac{d}{dx} dx = 0 $$ and the same for $\langle p^{2} \rangle$ which result in the uncertainty $\Delta p = 0$. But this isn't allowed according to the uncertainty principle. Where is the catch?