Obtaining mode decomposition of quantum field in a box with Dirichlet condition

I am considering the Klein Gordon Equation in a box with Dirichlet conditions (i.e., $\hat{\phi}(x,t)|_{boundary} = 0$). 1-D functions that obey the Dirichlet condition on interval $[0,L]$ are of the form below (using the discrete Fourier sine transform) $$f(x) = \sum_{n=1}^{\infty}f(n)\sqrt{\frac{2}{L}}\sin(\frac{n \pi}{L}x) \tag 1$$

I need to find a mode decomposition of $\hat{\phi}(\overrightarrow{x},t)$ in terms of $\hat{\phi}(\overrightarrow{n},t)$ and obtain the Klein Gordon equation in terms of $\hat{\phi}(\overrightarrow{n},t)$.

I decided (and this is a guess) to write $\hat{\phi}(\overrightarrow{x},t)$ as

$$\hat{\phi}(\overrightarrow{x},t) = (\frac{2}{L})^{\frac{3}{2}}\sum_{n_1,n_2,n_3=1}^{\infty}\hat{\phi}(\overrightarrow{n},t)\sin(\frac{n_1 \pi}{L}x)\sin(\frac{n_2 \pi}{L}y)\sin(\frac{n_3 \pi}{L}z)\tag2$$ where $\overrightarrow{n} = (n_1,n_2,n_3)$ and $\overrightarrow{x} = (x,y,z)$

This obeys the Dirichlet boundary condition for a box of dimensions $[0,L], [0,L], [0,L]$. However, I'm not sure if it encompasses all possible $\hat{\phi}(\overrightarrow{x},t)$ that obey the Dirichlet boundary condition. Is this correct?

Anyways, I stuck this into the Klein Gordon Equation: $$(\frac{\partial^2 }{\partial t^2} - \Delta + m^2)\hat{\phi}(\overrightarrow{x},t) =0$$ where $\Delta$ is the Laplacian $\frac{\partial^2 }{\partial x^2} + \frac{\partial^2 }{\partial y^2} + \frac{\partial^2 }{\partial z^2}$

and obtained $$\sum_{n_1,n_2,n_3=1}^{\infty}\sin(\frac{n_1 \pi}{L}x)\sin(\frac{n_2 \pi}{L}y)\sin(\frac{n_3 \pi}{L}z)(\frac{\partial^2 }{\partial t^2} + \frac{n^2\pi^2}{L^2} + m^2)\hat{\phi}(\overrightarrow{n},t)=0\tag3$$ where $n^2 = n_1^2 + n_2^2 + n_3^2$

It looks like this is the form for uncoupled harmonic oscillators of frequency $\sqrt(m^2+\frac{n^2\pi^2}{L^2})$, uncoupled because the Laplacian $\Delta$ isn't present. But how do I go about reducing this to a Klein Gordon equation form without the $\sum$ and all the $\sin$ functions. If I can prove that every term (corresponding to a triplet $(n_1,n_2,n_3)$) in the summation in eqn. $(3)$ is equal to zero, I can argue that since the $\sin$ terms cannot be zero for all $\overrightarrow{x}$, the Klein Gordon equation for uncoupled harmonic oscillators would follow. i.e., $$(\frac{\partial^2 }{\partial t^2} + \frac{n^2\pi^2}{L^2} + m^2)\hat{\phi}(\overrightarrow{n},t)=0\tag4$$ But how do I show that each of the terms in the summation must be equal to zero (if at all it is true)?

• Hi David, welcome to PSE. Please, stop making trivial edits to bump the question into the front page. Such behaviour is considered to add noise to the site, and is usually frowned upon. You have to be patient, it usually takes at least one or two days to get an answer. Thank you for your collaboration. Cheers! – AccidentalFourierTransform Apr 23 '18 at 22:16
• Hello, I wasn't aware that editing would bump the question. I actually had made a few errors in my calculation and was updating the question accordingly. Some others I was trying to add clarification. Sorry. – David Apr 24 '18 at 0:03
• No worries. Just bear in mind in the future that every edit moves the post to the front page, and we typically prefer significant edits rather than minor ones. – AccidentalFourierTransform Apr 24 '18 at 0:07

The $\sin$ functions form a complete orthonormal basis for functions with the boundary conditions stated, so yes, they do encompass all possible fields in this problem. Notice that everything to the right of them in your Eqn. (3) is independent of spatial coordinates: Now, you can multiply the LHS and RHS by $\sin\left(\frac{m_1 \pi}{L} x\right)\sin\left(\frac{m_2 \pi}{L} y\right)\sin\left(\frac{m_3 \pi}{L} z\right)$ and integrate over $x$, $y$, and $z$ from $[0,L]$. The RHS stays zero, and the integrals project out the individual modes $m_1$, $m_2$, and $m_3$ from the sum. The result should look very similar to your Eqn. (4).
• I only added that clarification due to the slight notational difference. Using $m_1$, etc., as I suggested, it would be $m$'s, not $n$'s, appearing in Eqn. (4). Of course, $m$ might not be the best choice, so as not to confuse the modes with the mass. – Josh McK Apr 24 '18 at 19:24
• Yes I noticed this while deriving. I argued that after multiplying by the $\sin(m_i)$'s and integrating, one would get the Klein gordon equation but it would only be valid for that particular set of chosen $m_i$'s. One would have to repeat this process with all possible values of $m_i$'s from $1$ to $\infty$. Then, the $m$ variables would be equivalent to $n$ variables and you can get the Klein Gordon equation using $n$. Many thanks. – David Apr 25 '18 at 3:00