I'm reading the book "The Quantum Theory of Light", by Rodney Loudon, and I came across the following passage describing the general form of the electromagnetic field in a cubical conductive cavity with side length $L$:
The electric field in empty space must satisfy...the Maxwell equation $\nabla\cdot\overrightarrow{\mathbf E}=0$. The solution that satisfies the boundary conditions has components:$$E_x(\mathbf{rt})=E_x(t)\cos(k_xx)\sin(k_yy)\sin(k_zz),$$ $$E_y(\mathbf{rt})=E_y(t)\sin(k_xx)\cos(k_yy)\sin(k_zz),$$ $$E_z(\mathbf{rt})=E_z(t)\sin(k_xx)\sin(k_yy)\cos(k_zz).$$
The problem is, I don't see how this equation satisfies $\nabla\cdot\overrightarrow{\mathbf E}=0$ at all. Specifically, it seems like the value of the lhs of that equation is$$-(E_x(t)+E_y(t)+E_z(t))(\sin(k_xx)\sin(k_yy)\sin(k_zz)).$$There's no reason that $(E_x+E_y+E_z)$ needs to be zero, but it also can't be true that $\sin(k_xx)\sin(k_yy)\sin(k_zz)=0$ for every point in the cavity. Can anyone tell me what I am missing here?