Transverse vibrations of a rectangular membrane with discontinuously varying density