The electromagnetic field in electrical exploration problems is often represented as integrals with a fast-oscillating nucleus. When calculating these integrals
on a computer, it is necessary to deform the contour of integration into the plane
of the complex variable. The article studies the allowable deformation region of the
integration contour in the case of a non-uniform medium, in which strong and weak
solutions of electromagnetic field are analytical. The source of the field is a vertical dipole. A similar problem was solved for a horizontally layered medium with a
harmonious electrical or magnetic dipole as a source.