Canonical commutation relations for a real scalar field

I am taking my first course in QFT and have come across this problem

From the canonical commutation relations for a real scalar field $$\hat{\phi}$$ show that $$[\partial_i \hat{\phi} , \hat{\phi}] = 0,$$ where $$i$$ is a spatial index.

I have had an attempt but I'm not sure if what I'm doing is allowed. What I did is

The cannonical commutation relation tells us

$$[ \hat{\phi} (x^0,x^i) , \hat{\phi}(x^0,x^{'i})] = \hat{\phi} (x^0,x^i)\hat{\phi} (x^0,x^{'i})-\hat{\phi} (x^0,x^{'i})\hat{\phi} (x^0,x^{i})= 0$$

Taking $$\frac{\partial}{\partial x_i}$$

$$\frac{\partial \hat{\phi} (x^0,x^i)}{\partial x_i}\hat{\phi} (x^0,x^{'i})-\hat{\phi} (x^0,x^{'i})\frac{\partial \hat{\phi} (x^0,x^i)}{\partial x_i}= 0$$

Then set $$x'=x$$

$$[\partial^i \hat{\phi} (x^0,x^i),\hat{\phi} (x^0,x^i)]=0$$

• have a loot at the threads here or here, I think you will find your answer. – Vangi Apr 3 at 12:54
• Thanks Vangi I understand now – mathsisfun Apr 3 at 13:01