Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a question:

If I have to find the commutator $[x, p^2]$ (with $p= {h\over i}{d \over dx} $) the right answer is:

$[x,p^2]=x p^2 - p^2x = x p^2 -pxp + pxp - p^2x = [x,p]p + p[x,p] = 2hip$

But why can't I say:

$[x,p^2]=x p^2 - p^2x = - x h^2{d^2 \over dx^2} + h^2 {d^2 \over dx^2}x = 0$ ?

Thank you for your reply.

share|cite|improve this question
How do you derive '0' in the end? The point is that the 'multiply by $x$' operator and the 'differentiate with respect to $x$' operator don't commute, so you can't just blithely say that $xh^2\frac{d^2}{dx^2}$ = $h^2\frac{d^2}{dx^2}x$. – Steven Stadnicki Sep 25 '13 at 19:11
Of course, you can say that. But, it's is more involved. – Felix Marin Sep 25 '13 at 20:25
up vote 1 down vote accepted

Another way to calculate that commutator using $[x,p]=i\hbar$ and introducing intermediate commutators:

$$\begin{align} [x,p^2] & =xp^2-px^2=xp^2-ppx+pxp-pxp\\ &=xp^2-pxp+p(xp-px)\\ & =xp^2-pxp+p[x,p]\\ & =xp^2 -pxp+i\hbar p\\ &= xp^2-pxp+xpp-xpp+i\hbar p\\ &=xp^2-xp^2+(xp-px)p+i\hbar p\\ & = 2i\hbar p \end{align}$$

share|cite|improve this answer

What you describe is a quite common situation which pops up when dealing with commutators of operators. On an appropriate space of functions $\mathcal D$ (like an $L^2$-space or the Schwartz space etc...), the operators $x$ and $p$ are given by

$$x(f)(x):=xf(x), $$ $$p(f)(x):=\frac{h}{i}\frac{df}{dx}, $$

for all $f\in \mathcal D$ and $x$ in the domain of $f$. In other words, $x(f)$ and $p(f)$ are elements in $\mathcal D$, i.e. functions. In particular $\frac{df}{dx}$ is the derivative of $f$ w.r.t. $x$ at the point $x$, by convention.

The commutator


is the operator that, evaluated at any $f$, gives the function $[x,p](f)$ s.t.

$$[x,p](f)(x):=\frac{h}{i}x\frac{df}{dx}-\frac{h}{i}\frac{d}{dx}(xf)= \frac{h}{i}x\frac{df}{dx}-\frac{h}{i}x\frac{d}{dx}(f)-\frac{h}{i}f(x)= -\frac{h}{i}f(x), $$

or $[x,p](f)=-\frac{h}{i}f$.

Similarly, $$[x,p^2]$$ is the operator that, once evaluated at any $f\in \mathcal D$, gives the function $[x,p^2](f)$, with

$$[x,p^2](f)(x)=-h^2x\frac{d^2f}{dx^2}+h^2\frac{d}{dx}\left(\frac{d}{dx} (xf) \right)= -h^2x\frac{d^2f}{dx^2}+h^2\frac{d}{dx}\left(f+x\frac{df}{dx} \right)= -h^2x\frac{d^2f}{dx^2}+h^2\frac{df}{dx}+ h^2\frac{d}{dx}\left(x\frac{df}{dx}\right)=\\ -h^2x\frac{d^2f}{dx^2}+h^2\frac{df}{dx}+ h^2\frac{df}{dx}+ h^2x\frac{d^2f}{dx^2}=2h^2\frac{df}{dx}.$$





as expected.

share|cite|improve this answer
Of course, there are many more catches lurking behind the scenes too: for instance, both operators can easily take a function out of the $L^2$ space (this is a big part of why Schwartz spaces are so convenient - though of course many functions we're interested in don't belong to them). – Steven Stadnicki Sep 26 '13 at 21:59
yop, that is right: but Schwartz spaces are not so bad, after all :-) – Avitus Sep 29 '13 at 8:35

You treat $x$ like a scalar when in fact it is an operator. Let's write it as $\hat{x}$ instead. Then $[\hat{x}, p^2]$ is also an operator, so let's see what happens when we apply an arbitrary function $\psi$ to it. \begin{align} [\hat{x},p^2]\psi&=\left(\hat{x}p^2-p^2\hat{x}\right)\psi \\ &=-xh^2\frac{\mathrm{d}^2}{\mathrm{d}x^2}\psi+h^2\frac{\mathrm{d}^2}{\mathrm{d}x^2}(x\psi) \\ &=-xh^2\frac{\mathrm{d}^2}{\mathrm{d}x^2}\psi+h^2x\frac{\mathrm{d}^2}{\mathrm{d}x^2}\psi+2h^2\frac{\mathrm{d}}{\mathrm{d}x}\psi \\ &=2h^2\frac{\mathrm{d}}{\mathrm{d}x}\psi \\ &=2hi\frac{h}{i}\frac{\mathrm{d}}{\mathrm{d}x}\psi=2hip\psi \end{align} so that $[\hat{x},p^2]=2hip$.

share|cite|improve this answer
+1 for the Physics notation! – Avitus Sep 25 '13 at 19:40
Thank you everyone for your replies. My problem was that i viewed 0 like a function that I could derive, (with derivate = 0) but it's not the case. I have to view $[x,p^2]$ also like an operator that operate on a "test function" $f$ – Benzio Sep 25 '13 at 19:52
Yes, this is the point: to consider operators acting on functions. Same happens with the $a$ and $a^{\dagger}$ operators... ;-) – Avitus Sep 25 '13 at 20:14

You can say

$[x,p^2]=x p^2 - p^2x = - x h^2{d^2 \over dx^2} + h^2 {d^2 \over dx^2}x$

But that will not be equal to zero, since (1): $x h^2{d^2 \over dx^2}$ is not equal to (2): $h^2 {d^2 \over dx^2}x$.

It's clear that in (1), the differential operator is not operating on anything. But in (2), it's operating on $x$. So, we can write it in the form:

$[x,p^2]=x p^2 - p^2x = - x h^2{d^2 \over dx^2} + h^2 {d^2 \over dx^2}x = -xh^2{d^2\over dx^2} + h^2$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.