Klein-Gordon Hamiltonian commutator with annihilation (creation) operator Probably I'm missing something trivial here. When calculating a commutator of Klein Gordon Hamiltonian with annihilation/creation operator it seems that the operators are inserted under the integral, for example:
$$ [H, a_p^\dagger]=[\int \frac{d^3p}{(2*\pi)^3}\omega_pa_p^\dagger a_p, a_p^\dagger]=\int \frac{d^3p}{(2*\pi)^3}\omega_p[a_p^\dagger a_p, a_p^\dagger]. $$ 
Is there a justification for that or we just need to use another momentum variable for the annihilation/creation operator when inserting it under the integral, i.e 
$$ [H, a_p^\dagger]=\int \frac{d^3p}{(2*\pi)^3}\omega_p[a_p^\dagger a_p, a_q^\dagger]~? $$ 
 A: In the expression for the Hamiltonian, $\mathbf{p}$ is indeed a dummy variable. To stay consistent in notation, you should be renaming the dummy variable, not the variable subscripting $a^\dagger$ on the LHS. For example, rename $p\to p'$ in the integral:
$$[H,a^\dagger_\mathbf{p}] = \left[\int\frac{d^3p'}{(2\pi)^3}\omega_{\mathbf{p}'}a^\dagger_{\mathbf{p}'}a_{\mathbf{p}'}\,,\,a^\dagger_\mathbf{p}\right] = \int\frac{d^3p'}{(2\pi)^3}\omega_{\mathbf{p}'}[a^\dagger_{\mathbf{p}'}a_{\mathbf{p}'},a^\dagger_\mathbf{p}]\,.$$
As you can see, $\mathbf{p}'$ is integrated over. If you continue with the derivation here, you will end up with a $\delta^{(3)}(\mathbf{p}-\mathbf{p}')$ in your integral, collapsing it so that the final answer is in terms of $\mathbf{p}$ only.
A: 
Probably I'm missing something trivial here... for example:
$$ 
[H, a_p^\dagger]=[\int \frac{d^3p}{(2\pi)^3}\omega_pa_p^\dagger a_p, a_p^\dagger] 
$$

No. The above equation is wrong. You cannot use $p$ on the LHS of the equation as a free variable and also on the RHS of the equation as a dummy integration variable.
In other words:
$$
[H, a_p^\dagger]\neq[\int \frac{d^3p}{(2\pi)^3}\omega_pa_p^\dagger a_p, a_p^\dagger]
$$
But, rather:
$$
[H, a_p^\dagger]=[\int \frac{d^3k}{(2\pi)^3}\omega_k a_k^\dagger a_k, a_p^\dagger]
$$
