It is well-known that equilibrium density profiles of gases and fluids in gravitational potentials have an r−1 dependence, where r is the radius. This is found in both astronomical observations and detailed simulations in spherically-symmetric geometries. It is also well-known that the standard equation for hydrostatic equilibrium does not produce such solutions. This paper utilizes a Lagrangian formulation that produces a closed-form r−1 solution and identifies the needed terms to be added to the standard equation for hydrostatic equilibrium to obtain such a solution. Variants of the r−1 solution avoid a density singularity at the origin and a total-enclosed mass singularity at infinity. The resulting solutions are shown to be in good agreement with well-established density profiles of ordinary matter in galaxies, dark matter haloes, and the atmosphere of earth. Comparisons are made to solutions based on the standard hydrostatic equation, including solutions based on the Lane-Emden equation. The origins of differences are explained.