I'm trying to understand the classical derivation of Friedmann equation but I'm missing one step.
So, I start with accelerations, where $a$ is a scale factor
$\ddot{a}=-\frac{GM}{a^{2}}$
$\ddot{a}=-\frac{4\pi G}{3}\rho a$
Now multiply both sides by $\dot{a}$, and here is the question: Why LHS is
$\dot{a}\ddot{a}=\frac{1}{2}\frac{d}{dt}\left(\dot{a}^{2}\right)$