Deduction of Newton's Law of gravitation from Kepler's Law

Deduction of Newton's Law of gravitational force from Kepler's Law:

Let us consider:
The mass of a planet = $m$
The radius of the circular path of a planet=$r$
The mass of the sun = $M$
The velocity of the planet = $v$
The time of the revolution=$T$

The attraction force between the planet and the sun is achieved by the centripetal force i.e

$F=\frac{m v^{2}}{r} \qquad(1)$

The orbital velocity of the planet:

$v=\frac{Circumference \: of \: the \: circular \: path}{Time \: period}$

$v=\frac{2\pi r}{T} \qquad(2)$

From equation $(1)$ and equation $(2)$, we get

$F=\frac{m}{r} \left( \frac{2\pi r}{T} \right)^{2}$

$F=\frac{4 \pi^{2} mr}{T^{2}} \qquad(3)$

According to Kepler's third law i.e

$T^{2}=Kr^{3} \qquad(4)$

From equation$(3)$ and equation$(4)$, we get

$F=\frac{4 \pi^{2}mr}{Kr^{3}}$

$F=\frac{4 \pi^{2}}{K}\frac{mr}{r^{3}}$

$F=\frac{4 \pi^{2}}{K}\frac{m}{r^{2}} \qquad(5)$

The source of this force is the sun. So R.H.S of equation $(5)$ should be related to the sun. Since $m$ and $r$ are related to the planet. So the quantity $\frac{4 \pi^{2}}{K}$ should be related to some constant of the sun. Let $\frac{4 \pi^{2}}{K}$ be proportional to the mass of the sun. i.e

$\frac{4 \pi^{2}}{K m} \propto M$

$\frac{4 \pi^{2}}{K m} = G M $

Here $G$ is the proportionality constant and it is called the universal gravitation constant. Now substitute the $\frac{4 \pi^{2}}{K m} = G M$ in equation $(5)$. then we get

$F=G \frac{M m}{r^{2}}$

The above equation represents the force of attraction between the sun and the planet. It is also known as Newton's law of gravitational force.