# 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.

• In your second top relation you have a sign mistake. Remember the symmetry $x\to p, ~~~p\to -x$. Remember $\hat x= i\hbar\int dp |p\rangle \partial_p\langle p |$, but $\hat p=- i\hbar\int dx |x\rangle \partial_x\langle x |$... Just plug in and collapse the delta functions. Commented Jul 24, 2022 at 0:56

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...

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.$$

• I think this is not the question. The questioner certainly is aware of the result. Commented Jul 24, 2022 at 7:16
• I have no idea why you think so. They know the correct answer that they’re supposed to obtain, but they never mentioned being aware that the commutator is a constant and never said “I don’t care, I want to ignore that and do the calculation the hard way.” When asked to calculate something, I believe in doing it in the simplest way possible. I read the OP’s words, not the OP’s mind. Commented Nov 25, 2022 at 6:40
• It is what I thought back then. But sure, if you think otherwise, that's totally fine. Commented Nov 25, 2022 at 6:43
• If I do try to read their mind, the “somehow” in the OP’s next-to-last sentence suggests to me that they did not know the commutator. Commented Nov 25, 2022 at 6:44