Optical Filter with Sinusoidally Varying Permittivity Using Mathieu's Equation
This Demonstration shows the reflection and transmission of light propagating through a dielectric whose permittivity varies sinusoidally in the direction of propagation. Reflectance and transmittance can be displayed as a function of the number of periods of the truncated permittivity sinusoid. The effect of the sinusoid amplitude is displayed along with reflectance/transmittance. The reflectance, the wavelength at maximum reflectance and the width of the peak are displayed within the graphic. Forbidden optical ranges occur in the imaginary part of the characteristic equation.
Propagation of waves through sinusoidally varying permittivity media 
A plane electromagnetic wave with an electric field , propagating through an isotropic and uniform medium, obeys the equation
, where ,              (1)
and has a general solution composed of forward- and backward-propagating plane waves
This wave impinges on a rugate filter with a sinusoidally varying permittivity ,
, .              (3)
This results in Mathieu's differential equation ,
whose analytic solution is a linear combination of Mathieu functions 
The equation in the emerging side is also (1), but with different integration constants
Boundary conditions 
If the output medium is semi-infinite to the right, there is no reflected wave, therefore is equal to zero.
From Maxwell equations, it can be shown that and have to be continuous at the input and output boundaries. The integration constants to are calculated from these conditions.
The reflected power is thus defined as
Such a filter reflects the forward-propagating wave strongly at Bragg wavelengths ( for ), due to interference of incoming and reflected waves, creating reflection peaks.
If (4) is written as
and the period in is .
where are the eigenvalues, and has period :
The eigenvalues can be calculated with the following Wolfram Language function:
MathieuCharacteristicExponent[a, b].              (9)
Reflection takes place in the ranges where is complex, and transmission where is real. The forbidden or reflection bands calculated with (9) are the same as those calculated with (7).
, defined by , is the permittivity of the filter base material as well as the permittivity of the input and output sections.
defines, together with , the amplitude of the sinusoidal function of the filter.
(nm) is the period of , that is, ; is the wavelength of reflectance peak, according to a quarter wavelength Bragg reflection approximation.
cycles is the number of complete cycles of the sinusoid. Reflectance increases with the number of cycles.
"reflectance" is reflectance of the filter. increases with cycles and .
"transmittance" is transmittance of the filter, .
"Mathieu characteristic exponent": identifies the forbidden transmission bands, or equivalently the reflective bands. They do not depend on boundary conditions.
Snapshot 1: if , contrast is low, as is reflectance
Snapshot 2: if as before, but the number of cycles is increased to 200, reflectivity increases to
Snapshot 3: Reflecting peaks occur at , , , … with decreasing amplitude. Only the first two peaks are shown; they do not depend on specific boundary conditions.
 E. W. Weisstein, "Mathieu Differential Equation" from MathWorld—A Wolfram Web Resource. mathworld.wolfram.com/MathieuDifferentialEquation.html (Wolfram MathWorld).
 Wikipedia. "Mathieu Function." (Jan 8, 2020) en.wikipedia.org/wiki/Mathieu_function.
 P. Yeh, Optical Waves in Layered Media, New York: John Wiley, 1988.