#### Why there is the squaring of distance in newtons first law of gravitation?

Newton used the third law of Kepler to calculate the gravitational force of attraction. The gravitational force of the earth is weakened by distance.
Kepler's third law:-

The cube of the mean distance of a planet from the Sun is proportional to the square of its orbital period T,  Or, . This law is also referred to as the law of periods.

To derive inverse square law, Newton made some assumptions in planetary motion that planetary orbits can be considered as circular orbits.

Then he suggested that if planets are revolving around the sun, then there must be a centripetal force acting on them which is given by,

where, m is the mass of the planet moving around the sun in a circular path and v is the speed of the planet and r is its distance from the sun.

Then the force acting on an orbiting planet is given by---------------(1)  as mass m of the planet is constant.

If the time period of the planet is T,

So we can write,

So, we can write

Since is constant by Kepler's third law, we get -------(2)

From equation (1) and (2) we can say