Analysis of Longitudinally Inhomogeneous Waveguides using Taylor's Series Expansion