Title: The finite difference/variational method for inhomogeneous isotropic or anisotropic waveguides