Solution (source code)

= Solution

Differentiating $\langle O\rangle=\langle\psi|O|\psi\rangle$ and using the <Schrödinger equation> and its adjoint gives the <Ehrenfest theorem>
$$
\boxed{
\frac d{dt}\langle O\rangle
=\frac1{i\hbar}\langle[O,H]\rangle
+\left\langle\frac{\partial O}{\partial t}\right\rangle}.
$$