Newton's law of universal gravitation gives the force on a test mass a distance from a point source. Gauss's law for gravity states
The inverse-square point field has the stated flux through a surrounding sphere. Superposition extends it to distributed sources; the divergence theorem relates the integral and local forms. Symmetry is still needed to turn a flux into a pointwise field value.
For the gravitational field of an infinite uniform cylinder, a coaxial cylindrical Gaussian surface has no end-cap flux and constant inward field on its curved surface. The enclosed mass per unit length is inside and outside. Hence
Its magnitude rises linearly from zero, reaches at the surface, then decreases as . The field is continuous at , while its radial derivative changes because the density has a sharp edge.
Figure 1.
Gravity inside and outside an infinite uniform cylinder
. Original cylindrical Gauss-law result, normalized by the surface field. The narrow drilled hole and the thin test rod are neglected as perturbations of the source field. Details.
Use signed distance along the diameter hole. A rod displaced by occupies , so its force is . At equilibrium symmetry makes . Differentiating the moving endpoints gives
Thus the leading restoring force and oscillation frequency are
For an explicit positive-displacement check, put and integrate the inside and outside pieces for :
Its first-order term is , agreeing with the endpoint argument. The result is the diameter-rod oscillation in cylindrical gravity; it assumes a sufficiently long source cylinder and a narrow hole whose removed mass can be neglected.