  We present a rigorous Ewald summation formula to evaluate the electrostatic
interactions in two-dimensionally periodic planar interfaces of
three-dimensional systems. By rewriting the Fourier part of the summation
formula of the original Ewald2D expression with an explicit order N2 complexity
to a closed form Fourier integral, we find that both the previously developed
electrostatic layer correction term and the boundary correction term naturally
arise from the expression of a rigorous trapezoidal summation of the Fourier
integral part. We derive the exact corrections to the trapezoidal summation in
a form of contour integrals offering precise error bounds with given parameter
sets of mesh size and system length. Numerical calculations of Madelung
constants in model ionic crystals of slab geometry have been performed to
support our analytical results.
