Solution (source code)

= Solution

Differentiate $\mathbf g=\epsilon_0\mathbf E\times\mathbf B$, use the vacuum <Maxwell equations>, and use $\nabla\cdot\mathbf E=\nabla\cdot\mathbf B=0$. Componentwise vector identities then give
$$
\partial_tg_j+\partial_i\sigma_{ij}=0,
$$
where
$$
\boxed{\sigma_{ij}
=\epsilon_0\left(\frac12E^2\delta_{ij}-E_iE_j\right)
+\frac1{\mu_0}\left(\frac12B^2\delta_{ij}-B_iB_j\right)}.
$$
This is the negative of the conventional <Maxwell stress tensor>; with the sign used here, its divergence is the outward momentum flux.