The impulse operator in quantum mechanics is given by
\begin{align} \hat{p} = \frac{\hbar}{i}\nabla \end{align}
As a Hermitian operator, the expected value of this operator $\langle{p}\rangle = \langle \psi|\hat{p}\psi\rangle$ should be real. However, for a real wave function $\psi(\vec {r})\in \mathbb{R}$ (a valid solution to the Schrödinger equation) the resulting integral is imaginary:
\begin{align} \langle{p}\rangle = \frac{\hbar}{i}\int d^3r \cdot \psi \nabla \psi \end{align}
Is there an error in my thinking or is it impossible to calculate the expected value that way? An alternative approach would be to use the Fourier transform.