I'm a newbie reading quantum mechanics from "Inroduction to Quantum Meachanics" by Griffiths and in the early pages of the book the author defines:
$$\langle x\rangle =\int_{-\infty}^{\infty} x|\Psi(x,t)|\,dx = \int_{-\infty}^{\infty} \Psi^* (x)\Psi \,dx,$$
$$\langle v\rangle = \frac{d}{dt}\left(\langle x\rangle\right)= -\frac{i\hbar}{m}\int_{-\infty}^{\infty} \Psi^*\frac{\partial\Psi}{\partial x} \,dx,$$
$$\langle p\rangle = m\langle v\rangle= -i\hbar\int_{-\infty}^{\infty} \Psi^*\frac{\partial\Psi}{\partial x} \,dx,$$
so to me the author seems to be working out with expectations, which made perfect sense to me. I then googled the expression for kinetic energy and I was expecting to find out that:
$$\langle T\rangle=\frac{\langle p \rangle^2}{2m},$$
but instead, it seems that
$$\langle T\rangle=\frac{\langle p^2 \rangle}{2m}.$$
Why is this? I don't understand what happened in the case of kinetic energy. Why isn't the author now working with expected momentum in the case of expected kinetic energy? Can you perhaps show me a derivation of $\langle T\rangle $ and more importantly, explanation on why it is done like that? In the book, the author says that generally:
$$\langle Q(x, p)\rangle = \int \Psi^*Q(x, \frac{\hbar}{i}\frac{\partial}{\partial x})\Psi\,dx,$$
with advising that every $p$ should be replaced with $\frac{\hbar}{i}\frac{\partial}{\partial x}$ when calculating the expectation of interest. The why-part for this was however a bit non-existing.