Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Operators and commutors, and order.

  1. Feb 4, 2012 #1
    I'm having trouble figuring out why an equation simplifies the way it does.

    (x and p refer to x hat and px hat, h refers to h bar, and the momentum operator is h/i dψ/dx )

    I want to show that xpψ - pxψ = -h/i ψ

    I understand that xpψ= x χ h/i dψ/dx
    And pxψ= h/i x dψ/dx

    When you try to simplify the subtraction expression you get:
    x [itex]\times[/itex] h/i dψ/dx - h/i ψ - h/i x dψ/dx

    The first and last part cancel out (do they?) to give the middle, -h/i ψ as the correct final answer.

    But I don't get why they cancel, if that is what they are indeed doing. Is x χ (something) the same as (something) multiplied by x? If they are the same, then why don't they commute? In xpψ, you are calculating the effect of p on ψ followed by multiplication. In pxψ you are calculating the effect of multiplication by x followed by the effect of p.

    But then when you are subtracting them to find the commutor, you can suddenly treat the order as irrelevant and cancel stuff out? Or am I misunderstanding how they got the final result?

    (sorry if my notations are confusing, I'll work on learning how to write equations if no one knows what I am saying, this is just the commutation relation of position and momentum)
    Last edited: Feb 4, 2012
  2. jcsd
  3. Feb 4, 2012 #2


    User Avatar
    Science Advisor

    No. Operators in such expressions are usually taken to operate on everything to their right.
    So [itex]px\psi ~\equiv~ p(x\psi)[/itex].

    Does that help at all?
  4. Feb 4, 2012 #3
    So you started with working out [X,P]:
    [X,P] = xpψ - pxψ as you said.

    The first bit xpψ= x χ h/i dψ/dx is correct.
    But pxψ ≠ h/i x dψ/dx
    Don't know if that was just a mistake typing up but;
    pxψ = p(xψ) = h/i x dψ/dx +(h/i)ψ <--- since differentiation of product.

    In the end where
    {x × h/i }dψ/dx - h/i ψ - {h/i x }dψ/dx
    the bits in the curly brackets {} are the same since they are just numbers now, not operators. Its only the order of operators that matters.
  5. Feb 5, 2012 #4
    Thanks, both posts helped a lot.
  6. Feb 6, 2012 #5
    I'm quoting myself for reference here. I'm wondering how this question changes if this is the question instead:

    instead of ψ, you just have a general function, f(x). So my final answer would be -h/i f(x) (I think).

    What if you use py=-i d/dy and apply it to a function f(x,y) instead?

    xpyf(x,y)= x χ -i d(f(x,y))/dy
    pyxf(x,y)= -i [x d(f(x,y))/dy + f(x,y) dx/dy]

    What does d(f(x,y))/dy mean? How is it different from f(x,y) dx/dy (and what does that one mean as well?)? I'm not used to this heavy notation with derivatives.
    Last edited: Feb 6, 2012
  7. Feb 6, 2012 #6


    User Avatar
    Science Advisor

    You should be using partial derivatives:
    \frac{\partial f(x,y)}{\partial y}

    (If you're not familiar with this sort of thing, you'll most likely need a textbook on multivariate calculus.)
  8. Feb 6, 2012 #7
    Ok well in the problem I am doing, it gives the momentum operator as px= -i d/dx (not a partial derivative....)

    I went to talk to my professor and he said that for the second part with f(x,y), the operator is py= -i d/dy

    How do I know to change it to a partial derivative? I know how to take a partial derivative in the basic sense. Since both the x and y momentum operators specified a specific dimension, are they automatically partial derivatives with respect to that variable?

    So, in the first case with px I was able to get away with my method because the only variable present was x. But now that I have py, and I have x in the equation, I have to do something different?

    EDIT: Ok, wikipedia helped. So, if I have a function in terms of x and y, i.e. f(x,y). I take the partial derivative of this function with respect to y. so x d(f(x,y))/dy= 0, because x would be treated as a constant?

    What about f(x,y) dx/dy? That isn't a partial derivative, is it?

    EDIT 2: Nope, it wouldn't be zero. You are taking the partial derivative of the function f(x,y), it has nothing to do with the x in front of it

    Whereas the second part, dx/dy would act on the function in front of it? I'm so confused by this. How do you know what the numerator of the derivative is telling you to do? I've even seen them factor out functions from derivatives before. I don't know the rules for this so it all seems random to me.

    Grr, I'm not prepared for this. Derivatives have always just been a thing you take of a defined function. Not morphing strange notations into different strange notation that they never taught us.
    Last edited: Feb 6, 2012
  9. Feb 6, 2012 #8


    User Avatar
    Science Advisor

    The numerator doesn't tell you what to do. The operator does. E.g., for an ordinary derivative
    \frac{df(x)}{dx} ~\equiv~ \frac{d}{dx}\Big(f(x)\Big)
    and for a partial derivative
    \frac{\partial f(x,y)}{\partial y} ~\equiv~ \frac{\partial}{\partial y}\Big(f(x,y)\Big)
    \frac{\partial}{\partial y}\Big(A(x) B(y) \Big)
    ~=~ A(x) \frac{\partial}{\partial y}\Big(B(y) \Big)
    because x is kept constant while doing a partial derivative with respect to y. So you can move it outside the derivative just like an ordinary constant.

    OK, ok. Stop. You absolutely must get a textbook on the basics of multivariate calculus as your highest priority, since your teacher is obviously assuming that as prerequisite knowledge.

    Try the Schaum's Outline of Calculus, 5th ed. (Schaum's Outline Series) by Frank Ayres and Elliott Mendelson. It's really cheap, and most of the Schaum outline series contain lots of essential basics in concise form.

    (P.S: I know how you're feeling, btw. In my very first QM course, the lecturer solved the Schrodinger equation for the Hydrogen atom, using separation of variables, Legendre functions, Laguerre polynomials, -- all of which left most of the class thinking "what the f**k??" because the math courses in the same year hadn't yet covered that stuff.
  10. Feb 6, 2012 #9
    Ok, I think I knew this, I was just having a little breakdown. I know how to take a partial derivative. I just did not know it was a partial derivative because the notation listed for the operator was d, not [itex]\delta[/itex]. Can you explain this to me?

    As for the derivative: [tex]
    \frac{\partial f(x,y)}{\partial y} ~\equiv~ \frac{\partial}{\partial y}\Big(f(x,y)\Big)

    If you gave me a function like x^2y+y^2 instead of f(x,y) I would have been able to do this question probably without trouble. I just got confused because I was thinking I should be able to simplify what I did have, but I don't think you can, because there is no simplification for the general case of a function f(x,y).

    I believe my final answer for xpyf(x,y) - pyxf(x,y)= i f(x,y) dx/dy

    Because there is still a cancellation like for when I did the question for px. Except that now, the function is f(x,y) and it is dx/dy instead of dx/dx so that does not cancel out.

    Ok... and this is where I am going to be absolutely ashamed... I took multivariable calculus a couple years ago. But there was only one chapter on partial derivatives and all I remember doing was memorizing how to take multiple partial derivatives, and the basic "hold all other variables constant" rule. Except that I don't actually remember how to do it. I will be rereading that chapter very soon. The notation always confused me.

    Yeah, I'm pretty sure I'm the only one in the class even attempting the homework so far, haha. The course is pretty overwhelming. Thanks for your help though.
  11. Feb 6, 2012 #10


    User Avatar
    Science Advisor

    The correct symbol is not [itex]\delta[/itex] either, but [itex]\partial[/itex]. (There's a difference -- look carefully. :-)

    The [itex]\delta[/itex] symbol is sometimes used for functional derivatives (kinda like partial derivatives where there's an infinite number of variables), but don't worry too much about that just yet. :-)

    If you mean
    x p_y f(x,y) - p_y x f(x,y) ~=~ i f(x,y) \frac{\partial x}{\partial y}
    then you haven't yet finished, since x and y are assumed to be independent variables, which means that
    \frac{\partial x}{\partial y} ~=~ 0 ~=~\frac{\partial y}{\partial x} ~.
    Last edited: Feb 6, 2012
  12. Feb 6, 2012 #11
    Yeah I couldn't find the right symbol to use... So it was incorrect for the problem to use d/dx instead of [itex]\delta[/itex]?


    Are you saying that [tex]
    \frac{\partial x}{\partial y} ~=~ x\frac{\partial}{\partial y}[/tex]

    And the partial derivative of x with respect to y is 0.

    So all that, and my answer is zero? Did I mess up somewhere else?

    Doesn't it matter that I have f(x,y) out in front? In these problems, when the operator is all the way on the left, i.e. pxxf(x), you have to do the product rule. If what is in the numerator doesn't matter, why doesn't x factor out (or f(x) factor in) in this step:

    i f(x,y) \frac{\partial x}{\partial y} ~=~ i \frac{\partial f(x,y) x}{\partial y}

    Is that what I'm missing? But wait, if you actually do the product rule with that, you get the same exact function back:
    \frac{\partial f(x,y) x}{\partial y} ~=~ x\frac{\partial}{\partial y}\ f(x,y) + \frac{\partial f(x,y)}{\partial y}\ x ~=~ 0 + \frac{\partial f(x,y)}{\partial y}\ x

    so that can't be it.... If, in order to complete a derivative, you do indeed need to do the product rule, then I would say that I am correct and the problem is simplified. And it seems to me that you must do the product rule in this final step if you actually want to take that partial derivative.

    In the course of this thread I seem to have confused myself now about the product rule. It is first*derivative of the second + second*derivative of the first. Not first*derivative of the second but also maybe the first if you factor that into the derivative + second*derivative of the first.... Or does this go back to the concept that I just made up that you can keep taking the product rule again, but you will get the same function back no matter what?
    Last edited: Feb 6, 2012
  13. Feb 7, 2012 #12


    User Avatar
    Science Advisor

    Since you didn't post the full original text of the problem, I can't be sure.

    But I must now mention something else. Since this is all clearly a homework question, you're actually in violation of PF guidelines by posting it here. Please (re-)read the Forum Guidelines thread which appears at the top of the quantum physics forum, and also the other threads linked to therein.

    The homework forum has strict guidelines about how the question must be formatted, one of which is that you must begin with a full statement of the original problem. This ensures that potential helpers can actually help with the real problem, and are not trying to disentangle some confused version of it.

    I was saying what I actually said:
    \frac{\partial x}{\partial y} ~=~ 0 ~,
    but a corollary of this is that
    \frac{\partial\Big( x f(y) \Big)}{\partial y} ~=~ x \frac{\partial f(y)}{\partial y} ~.

    The position and momentum operators for orthogonal cartesian directions (such as [itex]x[/itex] and [itex]p_y[/itex]) commute, whereas [itex]x[/itex] and [itex]p_x[/itex] do not commute.

    That's wrong. The LHS is 0, but the RHS is not (which hopefully you can now see from my previous answers above).

    Your first step above is a misapplication of the Leibniz product rule. It should be
    \frac{\partial f(x,y) x}{\partial y}
    ~=~ f(x,y) \frac{\partial x}{\partial y} ~+~ \frac{\partial f(x,y)}{\partial y} \; x

    Probably best at this stage if you review the product rule for ordinary derivatives in that calculus textbook of yours, or perhaps on Wiki:


    and I think you should post any further followup questions over in the homework forum (and conform to its format guidelines when doing so), otherwise you might incur the wrath of the moderators...
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook