At 59:14 in this video, the expectation value of the energy of a harmonic oscillator is $$ \langle E \rangle = \int ||\tilde{\Psi}(p)||^2 \frac{p^2}{2m}\ \mathrm dp + \int ||\Psi(x)||^2\frac{m\omega^2}{2}x^2\ \mathrm dx\tag 1$$ My question is how was this equation reached? This was my attempt:$$\langle E \rangle = \int {\Psi}^*(x)~\hat{E}~\Psi(x)\ \mathrm dx=\int {\Psi}^*(x)\left(-\frac{\hbar ^2}{2m}\frac{\partial ^2 \Psi(x)}{\partial x ^2}\right)\ \mathrm dx + \int {\Psi}^*(x)\frac{m\omega^2}{2}\Psi(x)\ \mathrm dx $$
but I can't get any further. How can I reach equation $(1)$?