# Commutation of differential operators

## Homework Statement

Evaluate the commutator $\left[\frac{d}{dx},x\right]$

## Homework Equations

$\left[A,B\right]=AB-BA$

## The Attempt at a Solution

$\left[\frac{d}{dx},x\right]=1-x\frac{d}{dx}$

I don't know how to figure out $x\frac{d}{dx}$.

Related Calculus and Beyond Homework Help News on Phys.org
Try using a test function here i.e. calculate [d/dx,x]f(x) and when you are done make sure you get some expression (...)f(x) again then what is between the brackets is your commutator.

I actually just figured this out.
Can somebody please just check this one I did for mistakes?

[A,B]=[(d/dx + x),(d/dx - x)]
(AB-BA)f=(d/dx + x)(d/dx - x) f -(d/dx - x)(d/dx + x) f
(d/dx + x)(df/dx - xf)- (d/dx - x)(df/dx + xf)
(df^2/dx^2 - f - x df/dx)+(x df/dx - x^2f)-(df^2/dx^2 + f +x df/dx)+(x df/dx + x^2f)
=-2f

--> [(d/dx + x),(d/dx - x)]=-2

HallsofIvy
Homework Helper
If f is any function then (d/dx)(x f)=x df/dx+ f while x(d/dx)f= xdf/dx. The difference is f so the commutator, [d/dx, x] is the identity operator.

vela
Staff Emeritus
Homework Helper
I actually just figured this out.
Can somebody please just check this one I did for mistakes?

[A,B]=[(d/dx + x),(d/dx - x)]
(AB-BA)f=(d/dx + x)(d/dx - x) f -(d/dx - x)(d/dx + x) f
(d/dx + x)(df/dx - xf)- (d/dx - x)(df/dx + xf)
(df^2/dx^2 - f - x df/dx)+(x df/dx - x^2f)-(df^2/dx^2 + f +x df/dx)+(x df/dx + x^2f)
=-2f

--> [(d/dx + x),(d/dx - x)]=-2
That's fine.

You could have also used a few properties of commutators to save yourself some work, namely [A+B,C]=[A,C]+[B,C] and [A,B]=-[B,A]. Using those, you should be able to show that [(d/dx + x), (d/dx - x)] = 2[x, d/dx], and you've probably already worked out that last one and found it to be equal to -1.

That's fine.

You could have also used a few properties of commutators to save yourself some work, namely [A+B,C]=[A,C]+[B,C] and [A,B]=-[B,A].