This derivation is largely based on notes by David Weinberg.
Let us consider a self gravitating sphere of uniform density . The radius of the sphere changes according to Newton's law of gravity
Multiplying by and integrating with respect to time yields
Where is an integration constant. If is some initial radius, then we can define a dimensionless scale factor , and express our equation in terms of this dimensionless constant:
The equation we obtained is very similar to the Friedmann equation.