I'm asking about a use of the chain rule that I've seen in a couple of derivations but that I don't understand, I hoping for it to be clarified.
Let's say we start with the gravitational acceleration,
$$\frac{dv}{dt} = -\frac{GM}{R^2}$$
The left-hand side of the equation can be turned easily into, $$ \frac{dv}{dr} \frac{dr}{dt} = \frac{dv}{dr} v. $$ This is all fine but then the derivation that I'm looking through jumps to the following,
$$\frac{dv}{dr} v = \frac{d}{dr}\left(\frac12v^2\right).$$
I can work that step out backwards by recognizing that the derivative of $v^2/2$ gives back $v$ but I don't understand how you go from $\frac{dv}{dr} v$ to $\frac{d}{dr} (\frac12v^2)$.