In this paper we deal with the problem of diffraction of electromagnetic waves by a periodic interface between two materials. This corresponds to a two-dimensional quasi-periodic boundary value problem for the Helmholtz equation. We prove that solutions behave analytically with respect to variations of the interface. The interest of this result is both theoretical – the legitimacy of power series expansions in the parameters of the problem has indeed been questioned – and, perhaps more importantly, practical: we have found that the solution can be computed on the basis of this observation. The simple algorithm that results from such boundary variations is described. To establish the property of analyticity of the solution for the grating
with respect to the height δ, we present a holomorphic formulation of the problem using surface potentials. We show that the densities entering into the potential theoretic formulation are analytic with respect to variations of the boundary, or, in other words, that the integral operator that results from the transmission conditions at the interface is invertible in a space of holomorphic functions of the variables (x, y, δ). This permits us to conclude, in particular, that the partial derivatives of u with respect to δ at δ = 0 satisfy certain boundary value problems for the Helmholtz equation, in regions with plane boundaries, which can be solved in a closed form.