Solution of a transcendental equation encountered in diffraction problems