My textbook says that in a time invariant space with translational and rotational symmetry the Lagrangian only depends on the magnitude of the velocity. The galilean invariance says that a Lagrangian is mechanical equivalent to this Lagrangian after a Galilean transformation. With a Taylorexpansion we get:
$$L(v'^2)=L((\vec{v}+\vec{\epsilon})^2)=L(v^2)+\dfrac{\partial L}{\partial v^2}2\vec\epsilon\cdot\vec v$$
since these two are mechanical equivalent, partial derivative part should be a total differential. All the above I understand. But then my textbook says that $L$ can only be of the form $\dfrac{1}{2}mv^2$ or else we can not bring it to the form of a total differential.
I don't understand why $L$ can not be something else. Could someone please explain this?