Solutions of Einstein field equations that describe the motion of an expanding universe. There are two equations that can be named after Friedmann, the first describes the velocity of the scale factor and the second the acceleration. Sometimes only the first is called Friedmann equation and the second the acceleration equation. A third equation, the fluid equation, is needed to derive the acceleration equation. We will call the first one the equation of motion and the second one the equation of acceleration.
Consider an observer in an uniformly expanding universe with mass density $\rho$. The observer can see an equal distance in all directions. Consider a test particle of mass $m$ at a distance $r$ from the observer. According to Newton’s shell theorem, the particle will feel a gravitational force due only to the mass enclosed within $r$. The force
$$ F = \frac{GMm}{r^2} = \frac{4\pi G\rho r m}{3} $$
where the total mass enclosed within $r$ is $M=\rho 4\pi r^3/3$ and $G$ is the gravitational constant. Gravitational potential energy of the particle
$$ E_p = -\frac{GMm}{r} = -\frac{4\pi G\rho r^2 m}{3}. $$
The kinetic energy of the particle $E_k = mv^2/2 = m\dot{r}^2/2$ where $\dot{r}$ is the first derivative of $r$ with respect to time. The total energy of the test particle
$$ E_t = E_k + E_p = \frac{1}{2}m\dot{r}^2 - \frac{4\pi}{3}G\rho r^2 m $$
gives the evolution of the separation $r$ between two particles, the observer and the test particle. It should be valid for any two points in the universe.
This can be used to move to a different coordinate system, the comoving coordinates defined as a system carried along with the expansion. Because the expansion is uniform, the relationship between the real or physical distance $\bar{r}$ and comoving distance $\bar{x}$ is
$$ \bar{r} = a(t) \bar{x} $$
where $a(t)$ is the scale factor of the universe or the universal expansion rate. It tells us how the separation between objects is increasing with time or how the space itself is expanding. Let us replace $r$ in the total energy equation.
$$ E_t = \frac{1}{2}m \dot{a}x^2 - \frac{4\pi}{3} G\rho a^2x^2m. $$
Multiply both sides by $2/ma^2x^2$, rearrange terms and use the definition $kc^2=-2E_t/mx^2$ to get
\begin{equation} \label{fr} \left(\frac{\dot{a}}{a}\right)^2 = \frac{8\pi G}{3} \rho - \frac{kc^2}{a^2} \end{equation}
which is the equation of motion of the universe referred to as simply the Friedmann equation. Here $k$ is related to the geometry of the universe and often called the curvature of the universe. The curvature parameter
$$ k = - \frac{2E_t}{mc^2x^2} $$
does not depend on time or space because the ratio $E_t/x^2$ is constant and $c$ is the speed of light. Therefore, $k$ is a constant value throughout the evolution of a universe and has units of m$^{-2}$.
Total energy is conserved for two given particles or a given comoving distance, but it changes if we consider different pair of particles or, equivalently, different comoving distances, i. e. $E_t\propto x^2$ and, hence, $E_t/x^2=$ constant.
The equation of motion cannot be used without knowing how the density of the universe $\rho$ varies with time. This is where the fluid equation comes in. First law of thermodynamics says
$$ dE + PdV = T dS $$
where $E$ is the internal energy, $P$ pressure, $V$ volume, $T$ temperature and $S$ entropy. Here $V$ is the volume of an expanding universe with a comoving radius $x=1$. Hence, physical radius $r=a$ and the rest energy $E=mc^2=4\pi a^3\rho c^2/3$. The product rule gives the time derivative of energy
$$ \frac{dE}{dt} = 4\pi a^2\rho c^2 \frac{da}{dt} + \frac{4\pi}{3}a^3 \frac{d\rho}{dt} c^2 $$
and the rate of change of volume becomes $dV/dt = 4\pi a^2 da/dt$. Putting the expressions of $dE$ and $dV$ in the first law and considering $dS=0$ (the universe is expanding adiabatically), one can get
\begin{equation} \label{fl} \dot{\rho} + 3\frac{\dot{a}}{a} \left(\rho+\frac{P}{c^2}\right) = 0 \end{equation}
which is called the fluid equation because it describes the density evolution of a fluid. The two terms within brackets contribute to the change in density: the first term represents the decrement in density and the second term the loss of energy as the pressure of the universal material does work during expansion. There is no pressure force because the universe is homogeneous and isotropic. The pressure is related purely to the work done.
Another equation is needed to work with the fluid equation which is the equation of state relating pressure and density, i. e. giving $P\equiv P(\rho)$. Materials of different densities produce different pressures.
Differentiation of Eq. \eqref{fr} with respect to time gives
$$ 2\frac{\dot{a}}{a}\frac{a\ddot{a}-\dot{a}^2}{a^2} = \frac{8\pi G}{3}\dot{\rho} + 2\frac{kc^2\dot{a}}{a^3}. $$
Substitute the expression for $\dot{\rho}$ from Eq. \eqref{fl} and cancel the factor $2\dot{a}/a$ in each term to get
$$ \frac{\ddot{a}}{a} - \left(\frac{\dot{a}}{a}\right)^2 = -4\pi G \left(\rho+\frac{P}{c^2}\right) + \frac{kc^2}{a^2} $$
and finally use Eq. \eqref{fr} again to derive
\begin{equation} \label{ac} \frac{\ddot{a}}{a} = -\frac{4\pi G}{3} \left(\rho+\frac{3P}{c^2}\right) \end{equation}
which is the acceleration equation.