Variational analysis of the dielectric rib waveguide using the concept of 'transition function' and including edge singularities