Casimir effect from macroscopic quantum electrodynamics

The canonical quantization of macroscopic electromagnetism was recently presented in New J. Phys. 12 (2010) 123008. This theory is here used to derive the Casimir effect, by considering the special case of thermal and zero-point fields. The stress-energy-momentum tensor of the canonical theory follows from Noether's theorem, and its electromagnetic part in thermal equilibrium gives the Casimir energy density and stress tensor. The results hold for arbitrary inhomogeneous magnetodielectrics and are obtained from a rigorous quantization of electromagnetism in dispersive, dissipative media. Continuing doubts about the status of the standard Lifshitz theory as a proper quantum treatment of Casimir forces do not apply to the derivation given here. Moreover, the correct expressions for the Casimir energy density and stress tensor inside media follow automatically from the simple restriction to thermal equilibrium, without the need for complicated thermodynamical or mechanical arguments.


Introduction
The phenomenon of forces on macroscopic objects due to electromagnetic zero-point and thermal fields is usually called the Casimir effect, after the first, highly idealized, theoretical result in the subject [1]. A theory of the effect for realistic materials was given by Lifshitz and co-workers [2,3,4] and this remains the most general formalism for describing the local electromagnetic quantities that produce the forces. Some authors prefer other terminology, such as Casimir-Lifshitz effect, or van der Waals forces, to designate this same phenomenon; in this paper the term Casimir effect is used, both for the zero-point and thermal contributions.
Despite its good agreement with experiments that measure the zero-point Casimir force, there have been been persistent doubts about the status of Lifshitz theory as a quantum theory. These doubts are voiced, for example, in two recent publications [5,6], and a detailed analysis in [6] concludes that "Lifshitz theory is actually a classical stochastic electrodynamical theory". The source of these doubts is not difficult to find if one examines the details of Lifshitz theory. As the Casimir effect is a phenomenon of quantum electromagnetism in the presence of macroscopic media, one would expect the general theory of the effect to be based on the principles of quantum electrodynamics. Lifshitz theory, however, is based rather on the the principles of thermodynamics. In fact there is no Hamiltonian in Lifshitz theory and there are no quantized fields, yet the formalism seeks to calculate the forces caused by quantum zero-point fields (as well as by thermal fields).
The requirements of a quantum theory of light in media that can serve as a basis for the Casimir effect (among many other phenomena) are easy to identify. The theory must hold for arbitrary magnetodielectrics in order to be applicable to the realistic materials used in experiments, materials whose optical properties (dielectric functions) are known only through measurement. As the Casimir effect is a broadband phenomenon in which all frequencies must be included, the theory must also take full account of material dispersion and absorption. The classical theory of light in these circumstances is of course the macroscopic Maxwell equations, where the electromagnetic properties of the media are encompassed in arbitrary electric permittivities and magnetic permeabilities obeying the Kramers-Kronig relations. The theoretical basis of the Casimir effect should therefore be a quantum theory of Maxwell's macroscopic electromagnetism. But whereas the quantum theory of the free-space Maxwell equations, quantum electrodynamics (QED), was the foundation of quantum field theory, and led to a general formalism for quantizing classical field theories, this quantization procedure was not applied to macroscopic electromagnetism. What has become known in the literature as macroscopic QED is not based on the rules for quantizing field theories, but is instead a phenomenological theory wherein no rigorous quantization is attempted (see [7,8] for detailed presentations). This phenomenological procedure is subject to much of the criticism directed at Lifshitz theory, and it will be seen that the results derived in this paper require, among other things, an action principle, something that is lacking in the phenomenological approach. The quantization rules of quantum field theory were not obviously applicable in the case of macroscopic electromagnetism due to the complications of dispersion and dissipation, and this is what led to the phenomenological approach. In fact it had been "widely agreed" [9] that a proper quantization of macroscopic electromagnetism could not be performed, and that only in cases where a simple microscopic model of the dielectric functions of the medium is explicitly introduced could the standard quantization rules be applied. In [10], however, the canonical quantization of macroscopic electromagnetism was achieved, providing a rigorous macroscopic QED and removing the need for a phenomenological approach. Since the macroscopic QED derived in [10] applies to arbitrary magnetodielectrics and takes full account of dispersion and absorption, it meets the criteria outlined above for a rigorous quantum foundation for the Casimir effect. This paper derives the Casimir effect from macroscopic QED by considering the special case of thermal equilibrium. ‡ A brief summary of macroscopic QED is given in section 2. The stress-energy- ‡ Hereafter macroscopic QED refers to the canonically quantized theory presented in [10], not the previous phenomenological formalism [7,8].
momentum tensor of macroscopic electromagnetism is derived in full generality in section 3, by application of Noether's theorem to the action principle given in [10]. Specialization to thermal equilibrium (including the zero-point fields) is made in section 4. The expectation value of the electromagnetic part of the stress-energymomentum tensor in thermal equilibrium gives the Casimir effect. Correlation functions of the quantum field operators in thermal equilibrium are calculated in 5 and used in sections 6 and 7 to obtain the Casimir energy density and stress tensor.

Macroscopic QED
This section summarizes the results of macroscopic QED [10] that we require to derive the Casimir effect. The action of macroscopic electromagnetism is [10] where S em is the free electromagnetic action S X and S Y are the actions for free reservoir oscillators: and S int is the interaction part of the action, coupling the electromagnetic fields to the reservoir: α(r, ω) = 2ε 0 π ωε I (r, ω) The imaginary parts of the dielectric functions of the medium appear in the coupling functions (6); their real parts are given by the Kramers-Kronig relation [11,12]: and similarly for κ(r, ω).
As in [10], we assume the medium is isotropic, with scalar dielectric functions ε(r, ω) and κ(r, ω) = 1/µ(r, ω); anisotropy can be included by obvious modifications. The field equations of the action (1)-(6) are By solving the equations for the reservoir fields X ω and Y ω , the independent equations of the electromagnetic fields are found and are precisely the macroscopic Maxwell equations [10] ∇ · D = σ, where the charge density σ and current density j are given in terms of arbitrary freefield solutions for the reservoir fields X ω and Y ω . The other two Maxwell equations are identities in terms of the potentials A and φ.
As the action (1)-(6) features the dynamical fields and their first derivatives, canonical quantization can proceed without difficulty [10]. The resulting Hamiltonian can be diagonalized to the form where the diagonalizing eigenmode creation and annihilation operators obey The infinite zero-point energy has been omitted from the Hamiltonian (14). Zero-point energy is of course crucial for the Casimir effect, but the electromagnetic energy density and stress tensor will be calculated below taking full account of the zero-point fields.
The quantum macroscopic Maxwell equations hold with the charge and current density operators given, in the frequency domain, bŷ The relationship between fields in the time and frequency domains is, for the example of the electric field, The electromagnetic field operators and the reservoir field operators are also expressed in terms of the diagonalizing operators, as follows. For the electric field operator the relation follows from (19) and where the Green bi-tensor G(r, r ′ , ω) is the solution of The magnetic field operator iŝ Finally, the reservoir field operatorsX ω andŶ ω can be written in the frequency domain asX The last two equations were not explicitly written in [10]; they are obtained from the expansion (58) in [10] of the operatorX ω in terms of the diagonalizing operators, and the analogous expansion ofŶ ω , by inserting the results (70), (71), (76) and (88) of [10]. Use is also made of the fact that all frequency arguments are taken only at positive values (see (20)), so that the sums of frequencies in denominators do not give rise to poles.

Stress-energy-momentum tensor of macroscopic electromagnetism
The canonical formulation of macroscopic electromagnetism given in [10] leads directly to the stress-energy-momentum tensor of the system, in both the classical and quantum cases. As dissipation of electromagnetic energy by the medium is fully taken into account through the presence of the reservoir fields, a conserved total energy of the system exists (if the dielectric functions of the medium are time independent). Similarly, total momentum is conserved if the medium is homogeneous. The complete stress-energy-momentum tensor of the system follows from application of Noether's theorem to the action (1)- (6). We state the results for classical fields, but the quantum stress-energy-momentum tensor is of the same form because the quantum field operators obey the same dynamical equations as the classical fields, as shown in [10].

Energy density and energy flux
The invariance of the action (1)-(6) under active time translations of the dynamical fields implies a conservation law that can be extracted as follows [13]. We make an active infinitesimal time translation of all the dynamical fields-in the case of the vector potential, A(r, t) → A(r, t + ζ(r, t))-but take the translation ζ(r, t) to vary in space and time. The resulting change in the action can be reduced to the form where ρ is the energy density and s is the energy flux, obeying the conservation law The calculation is straightforward and yields where anti-symmetrization of tensor indices is denoted by square brackets and ǫ ijk is the Levi-Civita tensor [14]. As in the case of free-space electromagnetism [12,13], the energy density (28) and flux (29) that directly emerge from Noether's theorem are not gauge invariant. They are however equivalent to gauge-invariant quantities because they fail to be gauge invariant up to terms that identically satisfy the conservation law (27).
Specifically, the quantities Comparing (32) with (27), we see that if ∇ i f i t t is added to ρ, and ∂ t f t i t + ∇ j f j i t is added to s i , then the conservation law (27) will still hold. With use of the field equations (8)-(11), the energy density and flux that result from these additions are gauge invariant and are given by It is straightforward to verify that the conservation law (27) holds for (33) and (34) when the fields obey the dynamical equations (8)-(11).

Momentum density and stress tensor
The total momentum of the electromagnetic field plus matter is conserved in flat spacetime. In the description of macroscopic electromagnetism, however, the microscopic degrees of freedom of the magnetodielectric medium are not included in the action; as a result, the translation symmetry that gives rise to momentum conservation is not in general present in the dynamical system considered. A conservation law for momentum will exist within the macroscopic framework only if the coupling functions (6) are independent of position (a homogeneous medium) so that the action is invariant under active spatial translations of the dynamical fields. It is nevertheless instructive to retain the general case of an inhomogeneous medium; the conservation law for momentum will then be seen to fail in the inhomogeneous case due to the appearance of spatial derivatives of the coupling functions (6). We make an active infinitesimal spatial translation of all the dynamical fields; in the case of the vector potential this is A(r, t) → A(r + w(r, t), t). The resulting change in the action can be written where the momentum density p and stress tensor σ j i obey, in homogeneous media, the conservation law The form (35) is achieved with where L is the Lagrangian density, i.e. the integrand in the action (1). Again, the initial results (37) and (38) are not gauge invariant. The quantities identically satisfy to σ j i , does not affect the momentum conservation law (36). After these additions, and use of the field equations (8)-(11), we obtain a gauge-invariant momentum density and stress tensor: When the field equations (8)-(11) hold, the momentum density (42) and stress tensor (43) satisfy so that the conservation law (36) indeed holds for homogeneous media.

Thermal equilibrium
Casimir forces can be calculated from either the electromagnetic energy density or stress tensor in the presence of macroscopic media. General electromagnetic fields will exert forces on the media, but the Casimir effect is the special case when the fields are in their ground state (zero-point fields) or in thermal equilibrium with the media (the latter case of course includes the contribution of the former). To derive the Casimir effect we therefore need only assume that the eigenmodes of macroscopic QED are in a thermal mixed quantum state. The expressions for the electromagnetic energy density and stress tensor that determine the forces then follow from the general results (33) and (43) (which, as noted above, also hold for quantum field operators). This is in sharp contrast to Lifshitz theory [2,3,4], where extraordinarily complicated thermodynamical and mechanical arguments are required to obtain the electromagnetic stress tensor in media and vacuum, in a manner that has nothing obvious to do with the principles of quantum mechanics [6]. Although the calculations below are certainly tedious, the only ingredients are the quantum theory of macroscopic electromagnetism [10] and a restriction to the case of thermal equilibrium.
To impose thermal equilibrium on the bosonic eigenmodes of macroscopic QED, we assume that the expectation value of the number operator of the eigenmodes is given by Each eigenmode at each frequency ω and each position r is a quantum harmonic oscillator and so the expectation value for the number of quanta (excitation level) in each of these oscillators should be given by the Planck distribution (47). The complication in implementing this simple prescription is that the eigenmodes are a continuum in frequency and position. The obvious way of handling this last fact is to use delta functions as in (45), a procedure also followed in [6], where a simple quantized microscopic model of a medium was analysed. But it must be admitted that there is no clear mathematical basis for the density operator which is supposed to underlie the expectation value (45). The problem is that the density operator should be defined in terms of number states of the quanta, the excitation levels of the oscillators, but because a continuum of oscillators is excited, there is no clear way of writing and normalizing these number states from which one would then construct the density operator of a thermal mixed state. This may well be an inessential technical issue, but one should bear in mind that the apparently clear intuition employed in writing (45)-(48) conceals formidable mathematical difficulties. Moreover, careful study of the derivations that follow will show that the delta function in frequency in the correlation functions (45) and (46) is to be regarded as a limit to be taken only in the final stages of the calculations; this allows any ambiguities arising from products of delta functions to be negotiated.

Thermal field correlation functions
As all the dynamical field operators of macroscopic QED are expressible in terms of the eigenmode creation and annihilation operators, (45)-(48) immediately give the expectation values of products of field operators (correlation functions) in thermal equilibrium. For the current density operator (19) in the frequency domain we obtain where the notation × ← ∇ ′ denotes a curl with respect to the right-hand index, so that V(r)× ← ∇ = ∇ × V(r) for a vector V(r) (note that there is no minus sign included in this definition of ∇ acting on the right-hand side).. Equations (49)-(51) can be viewed as an example of the fluctuation-dissipation theorem, but here they are a simple consequence of macroscopic QED in thermal equilibrium.
From (20), the equal-time correlation function for the electric field operator is expressed in terms of the frequency-domain correlation function by (Terms of the form Ê (ω)Ê(ω ′ ) and Ê † (ω)Ê † (ω ′ ) vanish.) The frequency-domain correlation functions are written in terms of the Green bi-tensor using (20), (21) and (49)-(51); after spatial integrations by parts we obtain The correlation function Ê i (r, ω)Ê † j (r ′ , ω ′ ) is given by the complex conjugate of (53) with N (ω) replaced by N (ω) + 1. The right-hand side of (53) can be simplified as follows. We first note the symmetry property of the Green bi-tensor that holds for media invariant under time reversal (non-magnetic, § non-moving media) [4]: Take the matrix product of G * (r ′′ , r, ω) with (22) and integrate over r; after integration by parts and use of (54), the imaginary part of the resulting relation simplifies to Use of (55) and its complex conjugate, together with (54), allows (53) to be simplified to The equal-time correlation function (52) is, from (56) and (57), where a factor of 2N (ω) + 1 has been rewritten as a hyperbolic cotangent (recall (47)). Correlation functions for the magnetic field operator are easily found from the electricfield expressions through use of (23), with the results Correlation functions for the reservoir field operatorsX ω andŶ ω are found using (24) and (25). Our goal is to calculate the electromagnetic part of the energy density and stress tensor, by isolating the electromagnetic part of the expressions (33) and (43) when they are evaluated in the case of thermal equilibrium. This requires us to eliminate the reservoir fields by expressing them in terms of the electromagnetic fields and free-field terms that are independent of the coupling to the electromagnetic fields. § Note the distinction between the somewhat confusing terms magnetic media and magnetodielectric media. The former refers to media with permanent magnetizations in the absence of applied fields, the latter to media that have a non-trivial magnetic (and electric) response to electromagnetic fields.
Equations (24) and (25) perform this separation of the reservoir fields into terms that would be present in the absence of any coupling to the electromagnetic fields (the first terms on the right-hand sides) and electromagnetic terms (the second terms on the righthand sides). Only terms in correlation functions that depend on the electromagnetic fields are required to obtain the electromagnetic part of the energy density and stress tensor. We therefore drop terms in correlation functions that are independent of the electromagnetic fields. (Further remarks on the non-electromagnetic parts of the energy density and stress tensor will be made in the next section.) The correlation function in the frequency domain of the reservoir fieldX ω with itself is obtained using (24). We use a subscript E on the correlation function to denote the fact that we include only the terms that depend on the electric field; this yields the following correlation function: The third term on the right-hand side of (62) will produce a product of principal values if the quantities containing the infinitesimal number 0 + are expanded in terms of principal values and delta functions. This product of principal values would need to be treated with care depending on the integration variable to which they are referred (as well as integrations over ω ′ and ω ′′ , there will be an integration over ω in the energy density and stress). It is safer to rewrite the term in question in a form that does not produce a product of principal values; this can be done using the identity 1 From (63), the product of the quantities in square brackets in the third term on the right-hand side of (62) simplifies to where all terms apart from the right-hand side of (63) were expanded as principal values and delta functions (we do not perform a similar expansion in the last term in (63) and (64) at this stage simply to save space). At the risk of long-windedness, we rewrite (62) having inserted (64): The correlation function in the third term on the right-hand side of (65) is given by (56); the correlation functions in the first two terms are shown by (45)-(48), (21) and (19) to be Now we must focus on the expectation values containing onlyX ω that are required for the expectation values of the energy density (33) and stress tensor (43). In writing the expectation values we employ a shortened notation for two limits involving the Green bi-tensor: The limit r ′ → r appears because the expectation values of the energy density (33) and stress tensor (43) contain correlation functions evaluated at r ′ = r. But the Green bi-tensor itself diverges when r ′ = r, so the limit in (68) and (69) must be understood to be taken only in the final expressions for physical quantities. The zero-point part of the Casimir effect requires a regularization to remove the divergent zero-point energy that is always present in a homogeneous medium (including vacuum) and that does not contribute to the Casimir force. This regularization is implemented at the level of the Green bi-tensor in a manner familiar from Lifshitz theory [2,3,4]. We also understand this regularization to be included in (68) and (69) when they appear below in the Casimir energy density and stress tensor. For the energy density (33) we need ∞ 0 dω (∂X ω ) 2 /2 + ω 2X2 ω /2 ; from the general relation (52) it therefore follows that we must insert a factor of (ω ′ ω ′′ + ω 2 )/2 into (65).
Inserting this factor and substituting (66), (67), (56) and (6) we obtain, after minor simplifications, The right-hand side of (70) consists of a sum of three terms. The first two terms each contain a product of three delta functions; these terms containing three delta functions can be combined and written as 2 The third term on the right-hand side of (70) has a part containing the sum of two delta functions in a numerator; this part gives the contribution which cancels with (71). The first two terms in the sum on the right-hand of (70) have now been reduced to the parts containing a principal value; consider the first of these, namely 2 π c 2 (ω ′ ω ′′ + ω 2 ) ε I (r, ω)ε I (r, ω ′′ ) P 1 Because of the delta functions, (73) is restricted to contribute only when the denominator in the principal value vanishes; by the definition of a principal value there is no such contribution, unless the factor ω−ω ′′ in the denominator ω 2 −ω ′′2 is canceled by an equal factor ω − ω ′′ in the numerator. But there is such a factor in the numerator, obtained by Taylor expanding the remaining function of ω (apart from the the factor ω − ω ′′ in the denominator) around the point ω = ω ′′ ; the contribution of (73) is therefore The principal value in the second term in the sum on the right-hand of (70) is dealt with in the manner employed for (73). Implementing all these simplifications of (70), and using the symmetry ∆ E ij (r, ω) = ∆ E ji (r, ω) that follows from (54) and (68), we obtain 1 2 ( The equality (76) is easily verified by tracing back minor changes in the derivation of (75). We can now write the time-domain expectation value ∞ 0 dω (∂X ω ) 2 /2 + ω 2X2 ω /2 using (76), (75) and the general relation (52): Use of the identity in the last term of (77) allows the integration over ω to be performed by means of the Kramers-Kronig relation (7), yielding finally Turning now to the the expectation value containing onlyX ω that appears in the expectation value of the stress tensor (43), we see that this is Recalling the general relation (52), we must therefore insert a factor (ω ′ ω ′′ − ω 2 )/2 in (65). This factor, in the first term on the right-hand side of (65), can be written ω ′ (ω ′′ − ω)/2 because of the presence of δ(ω − ω ′ ), and so the pole at ω = ω ′′ inside the square brackets is cancelled. Similarly, the pole at ω = ω ′ in the second term on the right-hand side of (65) is also cancelled by the factor (ω ′ ω ′′ − ω 2 )/2. In the final term on the right-hand side of (65), multiplication by the factor (ω ′ ω ′′ −ω 2 )/2 also produces a simplification that follows from which vanishes when combined with a factor δ(ω ′ − ω ′′ ) from (56). We substitute (66), (67), (56) and (6) and find The time-domain expectation value ∞ 0 dω (∂X ω ) 2 /2 − ω 2X2 ω /2 follows from (81), (82) and the general relation (52); the Kramers-Kronig relation (7) can be immediately applied, with the result Expectation values for theŶ ω field analogous to (79) and (83) are also required. In keeping with the discussion earlier in this section, only terms that depend on the magnetic-field part ofŶ ω in (25) are included in the calculation and we denote this fact by a subscript B on expectation values. The derivations are very similar to those described in detail above for the case of theX ω field; we therefore simply state the results: where the definition (69) has been employed.
To calculate the expectation values of the energy density (33) and stress tenor (43) we also require the expectation values of ∞ 0 dω β(r, ω)Ŷ ωiBj and ∞ 0 dω α(r, ω)X ωiÊj . To find the first of these expectation values, we calculate the frequency-domain correlation function ofŶ ω andB. Again we include only terms that depend on the magnetic-field part ofŶ ω in (25) and denote this fact by a subscript B on the correlation function. From (25) and (23) we find The second correlation function on the right-hand side of (86) is found from (56); the first correlation function is shown by (45)-(48), (21) and (19) to be Insertion of (56) and (87) in (86), with use of (6), gives It is straightforward to show that the correlation function Ŷ ωi (r, ω ′ )B † j (r ′ , ω ′′ ) B differs from (88) by a complex conjugation and the replacement of N (ω ′ ) by N (ω ′ ) + 1; we can then compute the equal-time correlation function ofŶ ω andB using these frequency-domain results and the general relation (52). The expectation value of interest is ∞ 0 dω β(r, ω)Ŷ ωiBj B ; with use of (6) and the Kramer-Kronig relation (7), this expectation value is found to be ∞ 0 dω β(r, ω)Ŷ ωi (r, t)B j (r, t) The final expectation value required for our purposes is that of ∞ 0 dω α(r, ω)X ωiÊj . Only terms that depend on the electric-field part ofX ω in (24) are included; this fact is denoted by a subscript E on the correlation function. The calculation exactly parallels that leading to (89) and the result is This completes the set of expectation values needed to compute the electromagnetic part of the energy density and stress tensor in thermal equilibrium.

Casimir energy density
In the previous section we ignored the free-field parts of the operatorsX ω andŶ ω . The rationale for this omission in deriving the Casimir effect is that the stress-energy associated with the free-field part of the reservoir represents the absorbed energy due to the dissipation of the medium, together with the zero-point energy of the reservoir. The dissipated energy is included in the canonical theory of macroscopic electromagnetism, with the result that the system is closed and a proper quantization can be performed [10]. The description as a closed system is also essential to the existence of a stress-energymomentum tensor, derived in section 3. But Casimir forces are caused by the stressenergy of the electromagnetic fields, not by the stress-energy absorbed and dissipated in the medium. This is why the correlation functions of the previous section, which include only the electromagnetic contribution, determine the Casimir energy density and stress. The classical expression (33) for the energy density also holds in the quantum theory, except that the final term must be written in a hermitian form to give a hermitian energy-density operator. We thus have the operator The β-dependent term in (91) has an expectation value that follows immediately from (89); the hermitian combination in (91) just picks out the real part of (89), which is the entire right-hand side. The expectation value of the quadratic terms in the electric and magnetic fields in (91) are obtained from (58) and (61). When all terms are combined, the final expression for the Casimir energy density ρ is Note that the κ-dependent factor in (92) takes the form [d(ωµ)/dω]/µ 2 when written in terms of µ = 1/κ. Casimir forces at zero temperature can be found by using (92) to calculate the total Casimir energy of a configuration of objects and taking derivatives with respect to the parameters specifying their separations and relative orientations. The factors in (92) that depend on the dielectric functions have a familiar form: the Brillouin expression [12,11] for the monochromatic electromagnetic energy density of a lossless medium contains the same quantities, where ε and κ are real in that case. The result (92) is in many ways remarkably simple, considering that it holds for arbitrary dispersion (consistent with the Kramers-Kronig relations). Dispersion has a highly complicating effect on the electromagnetic energy of general fields in media, even when the difficulty of losses can be ignored [15]. Here the losses are compensated because of the imposition of thermal equilibrium, and the restriction to thermal (and zero-point) fields also has the special effect that dispersion contributes only through the simple first-order frequency derivatives in (92).
For computational purposes it is more convenient to re-express the frequency integral in (92) as a sum over imaginary frequencies. Because of the property [4] G(r, r ′ , −ω) = G * (r, r ′ , ω) of the Green bi-tensor, its real part is even in ω while is imaginary part is odd, and the same property holds for ∆ E ij (r, ω) and ∆ B ij (r, ω) (recall (68) and (69)). Moreover, the dielectric functions also have the property (93) [4]. The hyperbolic cotangent in (92), on the other hand, is odd in ω. All this means that the imaginary part of the integral in (92) is automatically extracted if we modify the integration over ω so that it runs from −∞ to ∞ and multiply by by −i/2; thus (92) can be replaced by We can now close the frequency integral in the upper-half complex frequency plane, where the dielectric functions and the Green bi-tensor are analytic [11,4]. This contour integral is given by the sum of the residue contributions from the poles in the hyperbolic cotangent term at positive imaginary frequencies ω = 2πik B T n/ , n = 0, 1, 2, . . .. With the notation iξ n := i 2πk B T n , n = 0, 1, 2, . . . , for these imaginary frequencies, the Casimir energy density (94) then has the form where the prime on the summation sign means that the first term in the sum is taken with a factor of 1/2 (because the contour passes through the pole at ω = 0), and where κ has been replaced by µ(= 1/κ). At zero temperature, where only the zeropoint contribution remains, the sum in (96) becomes an integral over positive imaginary frequencies: The correct expression for the Casimir energy density in media has been a subject of conflicting assertions; as pointed out in [16], however, only the form (97) gives a Casimir force between parallel plates that agrees with the force obtained from the vacuum stress tensor between the plates. The correct form of the energy density emerges automatically from macroscopic QED, which is moreover a fully quantum treatment of the problem.

Casimir stress tensor
The quantum stress tensor operator has the same form as the classical expression (43), when the latter is written so as to give a hermitian operator: The Casimir stress tensor is the expectation value of the electromagnetic part of (98) in thermal equilibrium. We proceed as in the case of the energy density in the last section. The α-and β-dependent terms in (98) have expectation values that follow directly from (90) and (89), and the expectation values of the terms quadratic in the electric and magnetic fields are obtained from (58) and (61). The Casimir stress tensor σ ij is thereby found to be As in the case of the Casimir energy density, a computationally more convenient formula for the stress tensor involves a sum over imaginary frequencies. The derivation is as described in leading up to (96) and the expression is c 2 ε(r, iξ n ) 1 2 δ ij ∆ E k k (r, iξ n ) − ∆ E ij (r, iξ n ) +κ(r, iξ n ) 1 2 δ ij ∆ B k k (r, iξ n ) − ∆ B ij (r, iξ n ) .
At zero-temperature we obtain from (100) the zero-point Casimir stress as an integral over positive imaginary frequencies: The formula (100) (with κ = 1) for the Casimir stress tensor in media was obtained by Herculean efforts in [3], and is the most general result of Lifshitz theory. Part of the reason why such an enormously complicated formalism was required in [3] is the lack of a Hamiltonian and Lagrangian basis for the theory, which also undermines any claims that the result applies to quantum electromagnetic fields (see Introduction). As in the case of the energy density in the last section, the Casimir stress tensor in media emerges in a self-contained manner from macroscopic QED in thermal equilibrium, without the need for additional input.
It is interesting also to compute the expectation value in thermal equilibrium of the quantum version of (44). The first term on the left-hand side of (44) has of course zero expectation value in the stationary situation of thermal equilibrium. The right-hand side must be written in hermitian form in the quantum theory, and using α∇ i α = ∇ i (α 2 )/2 and β∇ i β = ∇ i (β 2 )/2 its expectation value is found in a manner similar to that used to obtain (90) and (89). This leads to the following result for the divergence of the Casimir stress tensor: = k B T n=0 ′ 1 c 2 ∆ E j j (r, iξ n )∇ i ε(r, iξ n ) − ∆ B j j (r, iξ n )∇ i κ(r, iξ n ) .
As a final remark on the Casimir stress-energy-momentum tensor, we note that the energy flux and momentum density in this tensor must be zero, because the electromagnetic fields are in thermal equilibrium. It is straightforward to verify, by calculations similar to those used to obtain (92) and (99), that the electromagnetic parts (defined as in section 5) of the energy flux (34) and momentum density (42) do indeed vanish in thermal equilibrium.

Conclusions
The Casimir effect has been derived from macroscopic QED [10] by a simple restriction to thermal equilibrium. Expressions for the Casimir energy density and stress tensor were obtained for arbitrary inhomogeneous magnetodielectrics. As the results are derived from a rigorous quantization of electromagnetic fields in dispersive, dissipative media, they not subject to the criticisms that have been directed at the standard Lifshitz theory of the Casimir effect. Moreover, the canonical basis of macroscopic QED [10] means that the correct forms of the Casimir energy density and stress tensor in media emerge directly from the theory. In Lifshitz theory, by contrast, there is no Hamiltonian or Lagrangian, so that detailed mechanical and thermodynamical arguments are required to obtain the form of the electromagnetic stress tensor in media.