This is a question on mathematical physics. The conventional reasoning about the characteristic wave modes in a cavity is to apply the boundary conditions, namely, wave amplitude is equal to 0, and obtain discrete cavity-mode frequencies. My question here is, supposing we start by generating some arbitrarily shaped traveling wave inside the cavity. If this traveling wave contains both cavity-mode and non-cavity-mode frequencies, after bouncing around inside the cavity for while, how are those cavity-mode "standing" waves kept and other non-cavity-mode waves disappeared? In a math-physics setting, the dynamics obey a usual wave eq, with proper boundary (decaying) conditions. This is solved and the full dynamics in the solution should give us the answer. Has this problem already been fully treated and discussed in some math-physics books? if anyone knows such references, please kindly point me to them. Thanks!
[Modification] --- Below is the revised question ---
Let's consider a Fabry-Perot type wave filter, in which the input waves enter from one side and leave on the other end. Due to the constructing and destructing superposition at the output end, the output waves only take certain resonant frequencies. For example, $\omega_f = n\pi c/d$, where d is the distance between the plates. In this set-up, input waves would be expanded over various non-resonant modes, which are in the functional space larger than the cavity-mode space. My question is: as the decay rate $\gamma \rightarrow 0$, how do non-resonant modes "disappear" at the output end? I have assumed the decay is so weak that it wouldn't be responsible for the "disappearance" of non-resonant modes. So my original intention of the question, was to look into a detailed mathematical solution to this process. By doing that, I might better understand the dynamics of "disappearance" of non-resonant modes. I believe the actual mechanism must be the conversion from non-resonant modes to resonant modes. Another interesting thing is, this dynamic process should be independent of the specific material that the reflecting plates are made of.