Calculating $\langle p | [x,p] | \psi \rangle $ using Dirac notation Calculating $\langle p | [x,p] | \psi \rangle $ using Dirac notation.
I am aware of the relations
$$\langle p|x| \psi \rangle = i \hbar \frac{d}{dp}\langle p| \psi \rangle, \langle x | p|\psi\rangle = i \hbar\frac{d}{dx} \langle x | \psi \rangle$$
which should become relevant here:
$$\langle p | xp - px| \psi \rangle = \langle p | xp| \psi \rangle - \langle p | px| \psi \rangle$$
However, I am a bit stuck on how to think about two operators acting on $| \psi \rangle$. For example, for the first element in the equation above, should I think about it as $p$ acting on $| \psi \rangle$ first, then $x$? As such, the following becomes:
$$ \langle p|x| \psi \rangle = i\hbar \frac{d}{dp} \langle p | \psi \rangle$$
How do I approach the other one? I know that my final andger needs to somehow result in $i\hbar \langle p | \psi\rangle$... Your help is appreciated.
 A: The first term on the RHS of your second equation is not equal to your last equation. But you're right that we first apply $P$ and then $X$. More concretely, it might help to denote $P|\psi\rangle =:|\tilde \psi\rangle$. Then, by using your first equation as well as $\langle p|P|\psi\rangle = p \langle p|\psi\rangle$, we find
$$ \langle p|XP|\psi\rangle = \langle p|X|\tilde\psi\rangle = i\hbar \frac{\mathrm d}{\mathrm dp} \langle p|\tilde \psi\rangle =i\hbar \frac{\mathrm d}{\mathrm dp} \langle p|P|\psi\rangle =  i\hbar \frac{\mathrm d}{\mathrm dp} p \langle p|\psi\rangle = i\hbar \left(  \langle p|\psi\rangle + p  \frac{\mathrm d}{\mathrm dp}\langle p|\psi\rangle\right) \quad . $$
With the second term you can proceed similarly and it might help again to define $X|\psi\rangle =: |\psi^\prime\rangle$ etc...
A: That commutator is just a constant!
Since the canonical commutation relation is
$$[x,p]=i\hbar,$$
this means that
$$\langle p|[x,p]|\psi\rangle=\langle p|i\hbar|\psi\rangle=i\hbar\langle p|\psi\rangle.$$
