Prove that the derivative of
$$E = \frac12m\mathbf{v}^2 - \frac{GMm}{\|\mathbf{r}\|}$$ is
$$\frac{dE}{dt} = (m\mathbf{a})·\mathbf{v} + \mathbf{v}·\left( \frac{GMm}{\|\mathbf{r}\|^3}\right)\mathbf{r}$$
Anyway that I derive it, I cannot figure out how to end up with dot product of $\mathbf{v}$.
$E$ the total energy of a planet,
$m$ is the mass of the planet,
$\mathbf{v}$ is its speed,
$G$ is the universal gravitational constant,
$M$ is the mass of the sun,
$\mathbf{r}$ is the position vector from the sun to the planet
HINT
We have