I have already worked out the expectation value of the the product in the opposite order $\langle x\,p_x\rangle$. I'm now trying to work out the expectation value $\langle p_x \, x\rangle$. I've been trying to work it out from $$ \int \psi^* \left( -i\hbar\, \frac{\partial}{\partial x}\right)x \,\psi\, dx $$ I can't seem to get the given answer: $$ \langle p_x \,x\rangle^*-i\hbar $$ I was hoping someone could show me the intermediate steps as I think I must be making mistakes in my integration by parts.
2 Answers
The way you have written your equations could come as confusing because I think you are missing some brackets to clarify the terms. But assuming that I understood what you mean, then I actually think that if you already have the expectation value $\langle\hat{x}\hat{p}\rangle$, you do not need to perform a separate calculation to get the expectation value $\langle\hat{p}\hat{x}\rangle$. You can directly use the commutator:
$$ [\hat{x},\hat{p}]=i\hbar\Longrightarrow\hat{x}\hat{p}-\hat{p}\hat{x}=i\hbar\Longrightarrow\hat{p}\hat{x}=\hat{x}\hat{p}-i\hbar. $$
It then follows that $\langle\hat{p}\hat{x}\rangle=\langle\hat{x}\hat{p}\rangle-i\hbar$.
Is that * by the expectaion value meant to be an equals sign? If so I think you are trying to obtain the commutator of the position and momentum operator, not the expectation value. That given answer definitely isn't correct but the commutator given by the square brackets:
$[A,B] = AB-BA$
$[x,p_x]\psi = -[p_x, x]\psi = i\hbar$.
Computing the integral you can actually see this.
$-i\hbar\int \psi^*\frac{\partial}{\partial x} (x\psi) dx = -i \hbar \int\psi^* (\psi + x\frac{\partial \psi}{\partial x})dx $
$= -i\hbar\int \psi^*\psi dx + \int \psi^* x (-ih\frac{\partial}{\partial x} \psi) dx = -i\hbar + \langle x,p_x \rangle$