# How to calculate expected commutator values properly?

i am having some trouble trying to prove the Ehrenfest theorem for the 1-dimensional case. We know that $$\frac{d}{dt}\langle A\rangle=\frac1{i\hbar}\langle [\hat A,\hat H]\rangle+\langle\frac{\delta\hat A}{\delta t}\rangle.$$

Then, for momentum $\frac {\delta\hat p}{\delta t}=0$, so $$\frac{d}{dt}\langle p\rangle=\frac1{i\hbar}\langle [\hat p,\hat H]\rangle=\int\Psi^*[\hat p,\hat H]\Psi\ dx.$$

This is the part where my calculation diverges from the one on Wikipedia. Substituting $\hat p=-i\hbar\frac\delta{\delta x}$ and $\hat H=\frac{-\hbar^2}{2m}\frac{\delta^2}{\delta x^2}+V(x)$, we get \begin{align} [\hat p,\hat H]&=\hat p\hat H-\hat H\hat p\\ &=\left(-i\hbar\frac\delta{\delta x} \right)\left(\frac{-\hbar^2}{2m}\frac{\delta^2}{\delta x^2}+V(x) \right)-\left(\frac{-\hbar^2}{2m}\frac{\delta^2}{\delta x^2}+V(x) \right) \left(-i\hbar\frac\delta{\delta x} \right)\\ &=\left(\frac{\hbar^3}{2m}\frac{\delta^3}{\delta x^3}-i\hbar\frac{\delta V(x)}{\delta x} \right)-\left(\frac{\hbar^3}{2m}\frac{\delta^3}{\delta x^3}-i\hbar V(x)\frac\delta{\delta x} \right)\\ &=i\hbar V(x)\frac\delta{\delta x}-i\hbar\frac{\delta V(x)}{\delta x}. \end{align}

The expectation value integral is then $$\int\Psi^*(i\hbar V(x)\frac\delta{\delta x}-i\hbar\frac{\delta V(x)}{\delta x})\Psi\ dx=\int\Psi^*i\hbar V(x)\frac{\delta\Psi}{\delta x}\ dx-\int\Psi^*i\hbar\frac{\delta V(x)}{\delta t}\Psi\ dx,$$ whereas on Wikipedia it is said to be $$\int\Psi^*i\hbar V(x)\frac{\delta\Psi}{\delta x}\ dx-\int\Psi^*i\hbar\frac{\delta}{\delta t}(V(x)\Psi)\ dx.$$

Where am I going wrong in the commutator calculation that results in not having $\Psi$ under the derivative in the second integral?

First, let's compute the commutator acting on some function, say, $f$. We have,

$$[p,H]f = (-i\hbar\partial_x)\left(-\frac{\hbar^2}{2m}\partial^2_x + V\right)f-\left(-\frac{\hbar^2}{2m}\partial^2_x + V\right)(-i\hbar\partial_x)f$$

which we can expand, cancelling the $\partial^3_x$ terms and leaving,

$$=-i\hbar\partial_x (Vf) +i\hbar V\partial_xf = i\hbar[V\partial_xf - \partial_x(Vf)].$$ Now applying the product rule to the second term, we have,

$$[p,H]f= i\hbar(V \partial_x f \underbrace{- f\partial_x V - V\partial_x f}_{-\partial_x(Vf)}) = -i\hbar f \partial_x V.$$

We can now plug this into the formula for the expectation value and apply it to the wave function,

$$\frac{1}{i\hbar}\langle [p,H] \rangle = \frac{1}{i\hbar}\int dx \, \Psi^* [p, H] \Psi = -\int dx \, \Psi^*\frac{\partial V}{\partial x}\Psi = \mathbb{E} \left( -\frac{\partial V}{\partial x}\right)$$

which is analogous to $\frac{d}{dt}p = F = -\frac{d}{dx}V.$ To avoid mistakes evaluating commutators, either try to not write them out explicitly and apply commutation rules, or if you do expand them, make sure to apply them to some test function.