I started learning QED and I'm making my way through some introductory literature. I encountered a problem in a section that derives the commutator between the fields, $\left[A_i(x);E^j(y) \right] $. Working in the Coulomb gauge, they quote a naive guess:
$$\left[A_i(\vec x),E^j(\vec y) \right] = i\delta^j_i\delta(\vec x-\vec y)$$
But then go on to argue that we want $\nabla\cdot \vec{A} = \nabla \cdot \vec{E} = 0$ to hold, so should definitely have:
$$\left(\nabla\cdot \vec{A} \right) \left(\nabla \cdot \vec{E}\right) - \left(\nabla \cdot \vec{E}\right) \left(\nabla\cdot \vec{A} \right) = \left[\nabla\cdot \vec{A} , \nabla \cdot \vec{E} \right] = 0$$
but then using the naive commutator we get
$$\left[\nabla\cdot \vec{A}(\vec x) , \nabla \cdot \vec{E}(\vec y) \right] = i\nabla^2\delta(\vec{x}-\vec{y}) \neq 0$$
Now, I don't quite see how the last equality holds. I am not sure what to do with the differential operators in my commutator. Normally I'd try something along the lines of:
$$[\partial_x \phi(x),\psi(y)] = \partial_x[\phi(x),\psi(y)] + [\partial_x,\psi(y)]\phi(x) = \partial_x[\phi(x),\psi(y)] + 0$$
Where the second term vanishes as all derivatives are in $x$. But if I try to do a similar thing here I get something like:
$$\left[\nabla\cdot \vec{A}(\vec x) , \nabla \cdot \vec{E}(\vec y) \right]=\nabla\cdot\left[ \vec{A}(\vec x) , \nabla \cdot \vec{E}(\vec y) \right] =\nabla_y\cdot \left(\nabla_x \cdot\left[ \vec{A}(\vec x) , \vec{E}(\vec y) \right]\right) $$ (I put the subscripts in the last line so it;s clear which operator acts on which variable)
And clearly something goes wrong when I try to pull out the second divergence operator. Where am I going wrong with this? Thanks for your time!