Gravitational binding energy
The gravitational binding energy of a system is the minimum energy which must be added to it in order for the system to cease being in a gravitationally bound state. A gravitationally bound system has a lower ("i.e.", more negative) gravitational potential energy than the sum of the energies of its parts when these are completely separated—this is what keeps the system in accordance with the minimum total potential energy principle. For a spherical body of uniform density, the gravitational binding energy "U" is given by the formula formula_1 where "G" is the gravitational constant, "M  is the mass of the sphere, and R" is its radius. Assuming that the Earth is a sphere of uniform density (which it is not, but is close enough to get an order-of-magnitude estimate) with "M" = and "r" = , then "U" = . This is roughly equal to one week of the Sun's total energy output. It is , 60% of the absolute value of the potential energy per kilogram at the surface. The actual depth-dependence of density, inferred from seismic travel times (see Adams–Williamson equation), is given in the Preliminary Reference Earth Model (PREM). Using  this, the real gravitational binding energy of Earth can be calculated numerically as "U" = . According to the virial theorem, the gravitational binding energy of a star is about two times its internal thermal energy in order for hydrostatic equilibrium to be maintained. As the gas in a star becomes more relativistic, the gravitational binding energy required for hydrostatic equilibrium approaches zero and the star becomes unstable (highly sensitive to perturbations), which may lead to a supernova in the case of a high-mass star due to strong radiation pressure or to a black hole in the case of a  neutron star. Derivation for a uniform sphere. The gravitational binding energy of a sphere with radius formula_2 is found by imagining that it is pulled apart by successively moving spherical shells to infinity, the outermost first, and finding the total energy needed for that. Assuming a constant density formula_3, the masses of a shell and the sphere inside it are: formula_4 and formula_5 The required energy for a shell is the negative of the gravitational potential energy: formula_6 Integrating over all shells yields: formula_7 Since formula_3 is simply equal to the mass of the whole divided by its volume for  objects with uniform density, therefore formula_9 And finally, plugging this into our result leads to formula_10 Negative mass component. Two bodies, placed at the distance "R" from each other and reciprocally not moving, exert a gravitational force on a third body slightly smaller when "R" is small. This can be seen as a negative mass component of the system, equal, for uniformly spherical solutions, to: formula_11 For example, the fact that Earth is a gravitationally-bound sphere of its current size "costs" of mass (roughly one fourth the mass of Phobos – see above for the same value in Joules), and  if its atoms were sparse over an arbitrarily large volume the Earth would weigh its current mass plus kilograms (and its gravitational pull over a third body would be accordingly stronger). It can be easily demonstrated that this negative component can never exceed the positive component of a system. A negative binding energy greater than the mass of the system itself would indeed require that the radius of the system be smaller than: formula_12 which is smaller than formula_13 its Schwarzschild radius: formula_14 and therefore never visible to an external observer. However this is only a Newtonian approximation and in  relativistic conditions other factors must be taken into account as well. Non-uniform spheres. Planets and stars have radial density gradients from their lower density surfaces to their much denser compressed cores. Degenerate matter objects (white dwarfs; neutron star pulsars) have radial density gradients plus relativistic corrections. Neutron star relativistic equations of state include a graph of radius vs. mass for various models. The most likely radii for a given neutron star mass are bracketed by models AP4 (smallest radius) and MS2 (largest radius). BE is the ratio of gravitational binding energy mass equivalent to observed neutron star gravitational mass  of "M" with radius "R", formula_15 formula_16 Given current values and the star mass "M" expressed relative to the solar mass, formula_20 then the relativistic fractional binding energy of a neutron star is formula_21