## ABSTRACT

This chapter describes how light propagation in straight dielectric waveguides can be modelled in the frequency domain (FD) by the finite-difference approach. The finite-difference methods are simple and versatile techniques, which allow exposing the tricks and approximations involved in modelling on a real-space grid without getting lost in details of mathematics and coding. The finite-difference method samples electric and/or magnetic fields at a finite set of points in space and evaluates the derivatives appearing in the wave equations from the function values in the sampled points only. The finite-difference discretization matrices derived in the previous section had the property that only elements in the diagonal and the nearest two sub-diagonals were non-zero. The iterative eigensolver in MATLAB solves targeted eigenvalue problems using this approach. It is a distinct advantage of the finite-difference approach that the finite-difference matrix can be explicitly written down and inverted.