# How does one deal with derivative operator in quantum field theory properly?

Given creation and annihilation operators, $${a^{\dagger}(x,t)}$$ and $$a(x,t)$$ in non-relativistic quantum field theory, respectively, which satisfy the following properties: Now, I want to prove $$[H,N]=0.\tag{1}$$

I've used 2 ways to prove it. One is consider this equation using Heisenberg equation of motion, which is quite straightforward. However, when i try to prove it using commutation relations above, some problems show up. Since $$H=\int{d^3x \space a^{\dagger}(x,t)\nabla^2_xa(x,t)},\tag{2}$$ where $$\nabla^2_xa$$ indicate that the $$\nabla^2$$ operator acts on variable $$x$$.

And the number operator is defined as $$N=\int{d^3x \space a^{\dagger}(x,t)a(x,t)}.\tag{3}$$ My proof goes follows:

$$HN=\int{d^3x \space a^{\dagger}(x,t)\nabla^2_xa(x,t)} \int{d^3x' \space a^{\dagger}(x',t)(x',t)} =\int{d^3xd^3x' \space a^{\dagger}(x,t)\nabla^2_xa(x,t) a^{\dagger}(x',t) a(x',t)} \tag{4}$$ Next, i am using the commutation relation: $$[a(x,t),a^{\dagger}(x',t)]=\delta^{(3)}(x-x').\tag{5}$$ This leads to: $$HN=\int{d^3xd^3x' \space a^{\dagger}(x,t)\nabla^2_x (a^{\dagger}(x',t) a(x,t)+\delta^{(3)}(x-x')) a(x',t)}\tag{6}$$

If I regard $$\nabla_x$$ and $$a^{\dagger}(x',t)$$ commute, and perform the delta function integral, this ends up with 2 parts. So the equation equals to: $$NH+H.\tag{7}$$ How am i going to proceed properly? Where did i make mistake?

I deal with the delta function part like this:

Part of the $$HN$$ is: $$\int{d^3xd^3x' \space a^{\dagger}(x,t)\nabla^2_x \delta^{(3)}(x-x') a(x',t)}\tag{8}$$ Integating over $$dx'$$ gives:

$$\int{d^3x \space a^{\dagger}(x,t)\nabla^2_xa(x,t)}\tag{9}$$ So this is obviously the Hamiltonian. What's wrong with this?

Hint: This simplest way to prove eq. (1) is to use the formulas $$[a(x),N]~=~a(x)\qquad\text{and}\qquad [N, a^{\dagger}(x)]~=~a^{\dagger}(x)$$ directly in eq. (2), and that the number operator $$N$$ commutes with the derivative $$\nabla_x^2$$.