The reflectivity R of a multilayer stack and its first and second derivatives with respect to the phase change are derived here by a recursive method. These equations improve the determination of stability conditions for coatings and widen the applications to treatments other than antireflection coatings, as reported by Mouchart [Appl. Opt. 16, 2486 (1977)]. Some calculations are performed on grazing incidence antireflection coatings, all-dielectric mirrors, and bandpass filters with non-quarter-wave layers.