From the theory of coupled modes, we can obtain the equation for $a_1(x)$: $a_1'' - \varkappa^2 a_1 = 0$. Taking into account the boundary condition $a_1(-L-l)=0$, we have
\[b_1(-L)=ia_1(-L) \cdot \tanh \kappa L\]
On the other side of the system, the same relationship is obtained through the reflection coefficient:
\[a_2(L)=ib_2(L) \cdot \tanh \kappa L\]
System of equations:
\[
\begin{cases} a_2(L) - b_1(-L) \cdot ie^{2iknL} \coth \kappa L = 0\\
-a_2(L) \cdot ie^{2iknL} \coth \kappa L + b_1(-L) = 0
\end{cases}.\]
Self-consistency condition:
\[e^{4 ik nL} \coth^2 \kappa L = -1\]When $\kappa L = \infty$, we have the condition
\[4nL \frac{\omega_m}{c} = \pi + 2 \pi m\]
From the new self-consistency condition, find the relationship between $\omega''$ and $\kappa l$ at $\kappa l \gg 1$ for each eigenmode of the resonator.
To account for wave decay, we need to add the factor $e^{-\omega''t}$, where $t$ is the time it takes for the wave to travel from one end of the resonator to the other. That is, the self-consistency condition will practically remain unchanged:
\[ e^{4 i knL} e^{-\omega'' 4nL/c} \coth^2 \kappa l = -1.\]From this it follows that
\[e^{-\omega'‘ 4nL/c} \simeq 1 - \frac{4nL \omega’'}{c}= \frac{\sinh^2 \kappa l}{\cosh^2 \kappa l}\simeq1-\frac{e^{-2\kappa l}}{4}\]
The quality factor is determined by the ratio of the rate of decay of oscillations in the system to its frequency. For an oscillator with friction, the quality factor $Q$ is part of the equation of motion
\[ x'‘ + \frac{2\omega_0}{Q} x’ + \omega_0^2 x = 0,\]which has solutions
\[x = e^{-\omega_0/Q t} \left( A e^{i\omega_0 t} + Be^{-i \omega_0t} \right).
Therefore, the quality factor $m$ of the resonator mode is determined by the expression
\[Q_m = \frac{\omega_m}{\omega''}= 4\pi(1+2m)e^{2\kappa L} \]