I am new to quantum physics. We just learnt about wave equations, observables and expectation values today. What really caught my attention was the expectation value of average momentum and energy:
$$\langle p \rangle = \int_{-\infty}^\infty \text{d}x\,\,\, \psi^*(x,t) \frac{\hbar}{i}\frac{\partial}{\partial x}\psi(x,t)$$
$$\langle H \rangle = \int_{-\infty}^\infty \text{d}x\,\,\, \psi^*(x,t) i\hbar\frac{\partial}{\partial t}\psi(x,t)$$
For the first equation, we take the $\hbar/i$ outside the integral. Obviously, the value of the integral has to be either real or complex. If it is complex, then it's completely fine as both the $i$s get cancelled out. But what if it's real? I read online that since momentum is represented by a Hermitian operator, all of its eigenvalues are real. Does this mean that the integral in this case is always zero?
I have the same question regarding the average energy. If the integral is complex, then nothing to worry about. But if it is real, then does it have to be zero? On the other hand, if the integral can be a real non-zero value, what does it mean for the average momentum to be imaginary?
I'm not sure what exactly I'm missing here. It would be great if someone could help me out with this. Please note, I'm a complete beginner to this whole concept (as mentioned in the beginning).