the force of gravity and [electric charge] varies inversely by the square of the distance of separation D squared

A classical description is to consider "lines of force" which come out from a source (a mass or a charge). A small test object placed in this force field will experience a force which is proportional to the density of these lines of force.

These lines of force will spread out radially from an isolated source in space. Since the area of a sphere increases as D

^{2}, the density of these lines decreases as 1/D

^{2}: the inverse square law.

why if the factor is EXACTLY D squared, does the force not become infinite at source

The source object rarely approaches zero radius.

Familiar matter has a density of 1-15 grams/cm2. This makes a measurable mass into a definitely non-zero radius.

- Imposing a large charge on a small-radius sphere is likely to cause corona discharge, which loses the charge. That's why high-voltage sources use large spheres for the electrodes.

- Concentrating a high mass into a small volume will collapse into a black hole, which has a non-zero radius.

Perhaps the most familiar almost-point charge is the proton, which plays a powerful role in chemistry. I have not yet seen reports of production of micro-black holes (although they are theoretical possibility).

say magnetism

Magnetism does

*not *follow an inverse square law, because it always comes in opposing pairs (North and South)*. The "lines of force" join the North and South poles. This means that there is a degree of cancellation within any sphere, and the strength of a magnetic field decays much faster than 1/D

^{2}.

*If you ignore the hypothetical "magnetic monopole".

why if the factor is EXACTLY D squared, does the force not become infinite at source

In the

*far*-field, gravity and electric charge follow an inverse-square law.

However, in the near-field, local differences in the density of matter or shape of the electrode can cause changes which do

*not *follow an inverse square law. In particular:

- If you test the electric field inside a spherical metal electrode, the electric field is zero, due to Faraday Shielding

- If you test the gravitational field inside a spherical mass, the gravitational field is lower than immediately outside the sphere, declining to zero at the center.

So rather than increasing to infinity when D=0, the force declines to 0 when D=0.

This has been a classical explanation. Of course, in a quantum world, the concept of zero distance is a bit vague, due to the wave-like properties of all subatomic particles (and even atomic particles).