I'm trying to solve the standing electromagnetic modes in a cubical cavity problem without using separation of variables. The cube is a perfect conductor, and hence the boundary conditions are $E_{\parallel} = 0$ and $B_{\bot} = 0$.
Now, I try to solve the wave equation (there will be a total of six of them, but that's not my concern):
I start by taking the equation to Fourier domain, giving me, for instance for $E_{x}$:
$$E_x(\textbf{r},t) = \int_{\bf{R^3}} A(\textbf{k}) e^{i(\textbf{k} \textbf{r} - \omega t)} d \textbf{k}$$
where I've dropped the wave traveling back in time. This is a pretty standard result stating that any well behaved electromagnetic field can be expanded in a plane wave basis.
Now, I want to solve for standing waves, hence I want the exponential time factor to come out of the integral. This reduces my integral over $\bf{R^3}$ to a set of $\bf{k}$ vectors with a constant length, i.e., over a sphere of a given radius. This is because then $\omega = c*|k|$ will be constant, thus giving us:
$$E_x(\textbf{r})e^{-i \omega t} = e^{-i \omega t} \int_{\textbf{|k|}=R} A(\textbf{k}) e^{i\textbf{k} \textbf{r}} d \textbf{k}$$
But I do not know how to apply the boundary condition on $E_x(\textbf{r})$ and get the following condition on $\bf{k}$:
$$k_x = \frac {\pi n_x} {L}, k_y = \frac {\pi n_y} {L}, k_z = \frac {\pi n_z} {L}$$
Or is my attempt to not use separation of variables totally useless?