Abstract
Complete analytical expressions for the first and second derivatives of the gravitational potential in arbitrary directions due to a homogeneous polyhedral body composed of polygonal facets are developed, by applying the divergence theorem definitively. Not only finite but also infinite rectangular prisms then are treated. The gravity anomalies due to a uniform polygon are similarly described in two dimensions. The magnetic potential due to a uniformly magnetized body is directly derived from the first derivative of the gravitational potential in a given direction. The rule for translating the second derivative of the gravitational potential into the magnetic field component is also described. The necessary procedures for practical computer programming are discussed in detail, in order to avoid singularities and to save computing time.