text: From Maxwell's equations, the electromagnetic energy of a "free" field i.e. one with no sources, is described by:
  We introduce the "mode function"  that satisfies the Helmholtz equation:
  where  and assume it is normalized such that:
  We wish to "quantize" the electromagnetic energy of free space for a multimode field. The field intensity of free space should be independent of position such that  should be independent of  for each mode of the field. The mode function satisfying these conditions is:
  where  in order to have the transversality condition  satisfied for the Coulomb gauge in which we are working.
  To achieve the desired normalization we pretend space is divided into cubes of volume  and impose on the field the periodic boundary condition:
  or equivalently
  where  can assume any integer value. This allows us to consider the field in any one of the imaginary cubes and to define the mode function:
  which satisfies the Helmholtz equation, transversality, and the "box normalization":
  where  is chosen to be a unit vector which specifies the polarization of the field mode. The condition  means that there are two independent choices of , which we call  and  where  and . Thus we define the mode functions:
  in terms of which the vector potential becomes:
  or:
  where  and ,  are photon annihilation and creation operators for the mode with wave vector  and polarization . This gives the vector potential for a plane wave mode of the field. The condition for  shows that there are infinitely many such modes. The linearity of Maxwell's equations allows us to write:
  for the total vector potential in free space. Using the fact that:
  we find the field Hamiltonian is:
  This is the Hamiltonian for an infinite number of uncoupled harmonic oscillators. Thus different modes of the field are independent and satisfy the commutation relations:
  Clearly the least eigenvalue for  is:
  This state describes the zero-point energy of the vacuum. It appears that this sum is divergent – in fact highly divergent, as putting in the density factor
  shows. The summation becomes approximately the integral:
  for high values of . It diverges proportional to  for large .
  There are two separate questions to consider. First, is the divergence a real one such that the zero-point energy really is infinite? If we consider the volume  is contained by perfectly conducting walls, very high frequencies can only be contained by taking more and more perfect conduction. No actual method of containing the high frequencies is possible. Such modes will not be stationary in our box and thus not countable in the stationary energy content. So from this physical point of view the above sum should only extend to those frequencies which are countable; a cut-off energy is thus eminently reasonable. However, on the scale of a "universe" questions of general relativity must be included. Suppose even the boxes could be reproduced, fit together and closed nicely by curving spacetime. Then exact conditions for running waves may be possible. However the very high frequency quanta will still not be contained. As per John Wheeler's "geons" these will leak out of the system. So again a cut-off is permissible, almost necessary. The question here becomes one of consistency since the very high energy quanta will act as a mass source and start curving the geometry.
  This leads to the second question. Divergent or not, finite or infinite, is the zero-point energy of any physical significance? The ignoring of the whole zero-point energy is often encouraged for all practical calculations. The reason for this is that energies are not typically defined by an arbitrary data point, but rather changes in data points, so adding or subtracting a constant (even if infinite) should be allowed. However this is not the whole story, in reality energy is not so arbitrarily defined: in general relativity the seat of the curvature of spacetime is the energy content and there the absolute amount of energy has real physical meaning. There is no such thing as an arbitrary additive constant with density of field energy. Energy density curves space, and an increase in energy density produces an increase of curvature. Furthermore, the zero-point energy density has other physical consequences e.g. the Casimir effect, contribution to the Lamb shift, or anomalous magnetic moment of the electron, it is clear it is not just a mathematical constant or artifact that can be cancelled out.