Microwave and Optical Waveguide Analysis By the Finite Element Method