Solution (source code)

= Solution

Insert the <mode expansion of a free field> into the classical expression for $\mathbf P$. The $aa$ and $a^\dagger a^\dagger$ terms cancel after $\mathbf p\mapsto-\mathbf p$, while the mixed terms give, after the stated <normal ordering>,
$$
\boxed{\mathbf P=\int\frac{d^3p}{(2\pi)^3}\,
\mathbf p\,a_{\mathbf p}^\dagger a_{\mathbf p}.}
$$
Thus the momentum operator counts each occupied mode with weight $\mathbf p$.