Q:

How does this "integration" work? $\vec{x}\cdot\frac{\partial \vec{x}}{\partial y}= \frac{\partial}{\partial y}(\frac{1}{2}\vec{x}^{2})$

Various derivations I recently looked up contained this sort of "steps".
I fail to understand how what I suppose to be the Sum/Integral over $xdx$ can equal $xdx$ itself
Ex.:
$$\frac{d}{dt}(\dot{\vec{r}_i}\cdot\frac{\partial\dot{\vec{r}_i}}{\partial\dot{q_j}})-\dot{\vec{r}_i}\cdot\frac{\partial\dot{\vec{r}_i}}{\partial q_j}=\frac{d}{dt}\frac{\partial}{\partial\dot{q_j}}(\frac{1}{2}\dot{\vec{r}_i}^{2})-\frac{\partial}{\partial q_j}\cdot(\frac{1}{2}\dot{\vec{r}_i}^{2})$$
But I have yet to understand what exactly is happening here :(
I would be pleased if you could tell me what I am missing.

A:

Take it from the RHS instead, and use the product rule:
\begin{align}
\frac{\partial}{\partial y}\left(\frac{1}{2}x^2\right)
& =\frac{1}{2}\left[
\frac{\partial x}{\partial y}\cdot x+
x\cdot\frac{\partial x}{\partial y}
\right]
\\ & = 
x\cdot\frac{\partial x}{\partial y},
\end{align}
because the dot product is commutative.

