5 and for the conventional material, as can be seen in Fig. 3. The GHS is a lateral shift of totally reflected beams along the op- tical interface due to interference [35] (for GHS in cavities see Refs. [36, 37]). According to Ref. [38], a light beam in a conventional material reflected at the interface to a NIM ex- periences a negative GHS. In our case the light propagates in the NIM and is reflected at the interface to a conventional ma- terial. We compute the GHS by reflecting a Gaussian beam at a planar dielectric interface, neglecting boundary curvature effects [39]. For the mode in the conventional cavity, see Fig. 3(a), we find a nearly perfect agreement between such a beam reflection at a planar interface and the full mode cal- culation. For the mode in the NIM cavity, see Fig. 3(b), the agreement is somewhat reduced, but nevertheless the appear- ance of a negative GHS can be clearly seen. The phenomenon of negative refraction is here a result of the relative sign of the permittivity and the permeability in the boundary conditions (35) and (36). After the quantities ε , µ and their first derivative are spec- ified at a given reference frequency ω$_{r}$ , the modified mode equation (32), the modified permittivity (30), the modified permeability (31), the modified refractive index (33), and t he modified boundary conditions (35)-(36) have to be solved self-consistently. This can be done with only slight modifi- cations of standard approaches, such as the boundary element method [28]. As an example we consider again a mode in the limac¸on cavity with normalized frequency Re (Ω) R/c around 45 . 1 . We fix the reference frequency ω$_{r}$R/c therefore to be 45 . 1 . Note that the precise value of the reference frequency is not rele- vant as long as we choose the values for the permittivity, the permeability and their derivatives accordingly, e.g. by reading off their values from a material dispersion curve at the given reference frequency. For the NIM we consider ε ( ω$_{r}$ ) = − 9 / 4 and µ ( ω$_{r}$ ) = − 1 as in the previous section. To fulfill the con- straints from Eq. (29) α$_{ε}$ > 2 + 8 9 , α$_{µ}$ > 4 , (37) VII. DISCUSSION FIG. 3: (color online). Goos-H¨anchen shift in (a) a conventional cav- ity (cf. Fig. 1), and (b) a NIM cavity [cf. Fig. 2(a)]. The dotted line is the center of a Gaussian beam being reflected at the dielectri c inter- face. The appearance of the Goos-H¨anchen shift along the boundary is evident. The mode pattern is the full numerical solution of the respective mode equation. FIG. 2: (color online). (a) Near-field intensity pattern of a n electro- magnetic mode with Ω R/c = 45 . 0966 − i 0 . 0514 in a NIM cavity with ε ( ω$_{r}$ ) = − 9 / 4 , µ ( ω$_{r}$ ) = − 1 ( | n ( ω$_{r}$ ) | = 1 . 5 ), ω$_{r}$R/c = 45 . 1 , and linear frequency dispersion α$_{ε}$ = α$_{µ}$ = 4 . 1 . Arrows illus- trate the direction of the energy flow. (b) Unphysical mode wi th Ω 0 R/c = 45 . 1060 + i 0 . 1647 in a NIM cavity with ε = − 9 / 4 and µ = − 1 ( | n | = 1 . 5 ) calculated without frequency dispersion. To quantify small differences in the spatial pattern of the mode ψ 0 without frequency dispersion [as, e.g., in Fig. 2(b)] and a mode ψ with dispersion [as, e.g., in Fig. 2(a)] we exam- ine the normalized spatial overlap We restrict the integrals to the interior of the cavity C as the exterior is influenced by the actual value of the quality fact or. For the modes in Fig. 2 (a) and (b) we find 1 − S ≈ 1 . 6 × 10 − $^{4}$, so indeed the overlap is nearly unity. The lower panel of Fig. 4 shows 1 − S as function of the linear frequency dispersion α$_{n}$ . Except near α$_{n}$ = 1 , the overlap 1 − S is below 0 . 001 . The upper panel of Fig. 4 shows Q/ ( − Q 0 ) with Q 0 = − 137 as function of α$_{n}$ . It can be observed that for α$_{n}$ > 1 , where the field energy is positive, the Q -factor is also positive. Can we understand the basic features observed in Fig. 4? To do so, let us first note that the quantities | (˜ n − n ) /n | , | (˜ ε − ε ) /ε | , and | (˜ µ − µ ) /µ | are small, as required by the linear expansions, e.g., in Eq. (24). The applicability of perturbation Contrasting the mode in the NIM cavity in Fig. 2(a) with a corresponding mode in a conventional material in Fig. 1 clearly reveals the negative refraction. To be more precise, one part of the beam is confined by total internal reflection and another part is refracted out. Moreover, a careful inspec- tion shows a different Goos-H¨anchen shift (GHS) for the NIM S = | ∫ C dxdy ψ ∗ $_{0}$ψ | √ ∫ C dxdy ψ ∗ $_{0}$ψ 0 √ ∫ C dxdy ψ $^{∗}$ψ . (38) we first set α$_{ε}$ = α$_{µ}$ = 4 . 1 and vary this value later. Accord- ing to Eq. (34) the quantity α$_{n}$ is then also 4 . 1 . Figure 2(a) shows as an example a TM polarized mode. The Q -factor turns out to be positive, Q = 438 , due to the inclusion of the dispersion. Interestingly, the spatial mode pattern is rather in- sensitive to the inclusion of frequency dispersion, as a closer comparison of the dispersive case in Fig. 2(a) and the (un- physical) nondispersive case in Fig. 2(b) shows.