Derive the balance of kinetic energy from the momentum balance using the continuity equation.
The momentum equation in 3D reads as follows: $$ \frac{\partial\rho \mathbf{v}}{\partial t} + \nabla\cdot(\rho \mathbf{v}\otimes\mathbf{v}) = \nabla\cdot\sigma + \mathbf{f_b}. $$ The continuity equation is given by: $$\frac{\partial \rho}{\partial t} + \nabla\cdot(\rho\mathbf{v}) = 0.$$ In the exercise there is a hint to take the inner product of the velocity $\mathbf{v}$ with both sides of the momentum equation. Then to rewrite that with the help of the continuity equation to obtain the balance equation for the kinetic energy density: $$\frac{\partial }{\partial t}\left(\frac{1}{2}\rho v^2\right) = -\nabla\cdot\left(\frac{1}{2}\rho v^2\mathbf{v}\right) + \mathbf{v}\cdot(\nabla\cdot\sigma) + \mathbf{v}\cdot\mathbf{f_b}.$$ Here $v^2 := \mathbf{v}\cdot\mathbf{v}$.
What I've tried is to take the inner product with $\mathbf{v}$ and apply the product rule for derivatives: \begin{align} \mathbf{v}\cdot\left(\rho\frac{\partial\mathbf{v}}{\partial t}\right) + \mathbf{v}\cdot\left(\frac{\partial\rho}{\partial t}\mathbf{v}\right) + \mathbf{v}\cdot(\rho\mathbf{v}\cdot\nabla\mathbf{v}) + \mathbf{v}\cdot(\mathbf{v}\nabla\cdot(\rho\mathbf{v})) = \mathbf{v}\cdot(\nabla\cdot\sigma) + \mathbf{v}\cdot\mathbf{f_b} \end{align} Now the second and fourth term on the LHS should cancel out due to the continuity equation, right? But how will I now ever arrive at the correct equation? I don't get where the halfs are coming from. Should I maybe split the second term into half and substitute $\frac{\partial \rho}{\partial t} = - \nabla\cdot(\rho\mathbf{v})$ into only one of them? I still don't see how some of the other terms cancel out then. Help would be much appreciated.
Taking the dot product of $\mathbf{v}$ and the left-hand side of the momentum equation and using Cartesian components with the Einstein convention for summation over repeated indexes, we get
$$\tag{1}\mathbf{v} \cdot \left[\frac{\partial \rho \mathbf{v}}{\partial t} + \nabla \cdot (\rho \mathbf{v}\mathbf{v}) \right]= v_i \frac{\partial}{\partial t}(\rho v_i)+ v_i\frac{\partial}{\partial x_j}(\rho v_j v_i) \\= v_i^2 \frac{\partial\rho}{\partial t}+ \rho v_i\frac{\partial v_i}{\partial {t}}+ v_i^2\frac{\partial}{\partial x_j}(\rho v_j) + \rho v_j v_i\frac{\partial v_i}{\partial x_j}$$
By the product rule it follows that
$$ \tag{2}\frac{\partial }{\partial t}\left(\frac{1}{2}v_i^2\right)=\frac{1}{2} \frac{\partial v_i^2}{\partial t} = \frac{1}{2}\left[2 v_i\frac{\partial v_i}{\partial t}\right] = v_i\frac{\partial v_i}{\partial t}, \\ \frac{\partial }{\partial x_j}\left(\frac{1}{2}v_i^2\right)=\frac{1}{2} \frac{\partial v_i^2}{\partial x_j} = \frac{1}{2}\left[2 v_i\frac{\partial v_i}{\partial x_j}\right] = v_i\frac{\partial v_i}{\partial x_j}$$
Substituting into (1) with (2), we obtain
$$\mathbf{v} \cdot \left[\frac{\partial \rho \mathbf{v}}{\partial t} + \nabla \cdot (\rho \mathbf{v}\mathbf{v}) \right]\\= v_i^2 \frac{\partial\rho}{\partial t}+ \rho \frac{\partial }{\partial {t}}\left(\frac{1}{2}v_i^2\right)+ v_i^2\frac{\partial}{\partial x_j}(\rho v_j) + \rho v_j \frac{\partial }{\partial x_j}\left(\frac{1}{2}v_i^2\right)\\ = v_i^2 \frac{\partial\rho}{\partial t}+ v_i^2\frac{\partial}{\partial x_j}(\rho v_j) + \rho \frac{\partial }{\partial {t}}\left(\frac{1}{2}v_i^2\right)+ \rho v_j \frac{\partial }{\partial x_j}\left(\frac{1}{2}v_i^2\right)\\ = \frac{1}{2} \left[v_i^2 \frac{\partial\rho}{\partial t}+ v_i^2\frac{\partial}{\partial x_j}(\rho v_j) \right]+ \frac{1}{2} \left[v_i^2 \frac{\partial\rho}{\partial t}+ v_i^2\frac{\partial}{\partial x_j}(\rho v_j) \right]+ \rho \frac{\partial }{\partial {t}}\left(\frac{1}{2}v_i^2\right)+ \rho v_j \frac{\partial }{\partial x_j}\left(\frac{1}{2}v_i^2\right)\\ = \frac{v_i^2}{2} \left[ \frac{\partial\rho}{\partial t}+ \frac{\partial}{\partial x_j}(\rho v_j) \right]+ \frac{1}{2} v_i^2 \frac{\partial\rho}{\partial t}+ \rho \frac{\partial }{\partial {t}}\left(\frac{1}{2}v_i^2\right)+ \frac{1}{2}v_i^2\frac{\partial}{\partial x_j}(\rho v_j) +\rho v_j \frac{\partial }{\partial x_j}\left(\frac{1}{2}v_i^2\right)$$
By the continuity equation, the first term on the RHS vanishes and we get
$$\tag{3}\mathbf{v} \cdot \left[\frac{\partial \rho \mathbf{v}}{\partial t} + \nabla \cdot (\rho \mathbf{v}\mathbf{v}) \right]\\=\frac{1}{2} v_i^2 \frac{\partial\rho}{\partial t}+ \rho \frac{\partial }{\partial {t}}\left(\frac{1}{2}v_i^2\right)+ \frac{1}{2}v_i^2\frac{\partial}{\partial x_j}(\rho v_j) +\rho v_j \frac{\partial }{\partial x_j}\left(\frac{1}{2}v_i^2\right),$$
By the product rule we can combine the second and third terms on the RHS of (3) as
$$\frac{1}{2} v_i^2 \frac{\partial\rho}{\partial t}+ \rho \frac{\partial }{\partial {t}}\left(\frac{1}{2}v_i^2\right) = \frac{\partial}{\partial t}\left(\frac{1}{2}\rho v_i^2\right), $$
and similarly we can combine the fourth and fifth terms on the RHS of (3) to get
$$\frac{1}{2}v_i^2\frac{\partial}{\partial x_j}(\rho v_j) +\rho v_j \frac{\partial }{\partial x_j}\left(\frac{1}{2}v_i^2\right) = \frac{\partial}{\partial x_j} \left[ \left(\frac{1}{2} \rho v_i^2\right) v_j \right]$$
Substituting into (3) yields
$$\mathbf{v} \cdot \left[\frac{\partial \rho \mathbf{v}}{\partial t} + \nabla \cdot (\rho \mathbf{v}\mathbf{v}) \right]\\=\frac{\partial}{\partial t}\left(\frac{1}{2}\rho v_i^2\right)+\frac{\partial}{\partial x_j} \left[ \left(\frac{1}{2} \rho v_i^2\right) v_j \right] \\ = \frac{\partial}{\partial t}\left(\frac{1}{2}\rho |\mathbf{v}|^2\right)+\nabla \cdot \left(\frac{1}{2} \rho |\mathbf{v}|^2 \mathbf{v} \right),$$
where under the Einstein convention $v_i^2 = v_1^2+v_2^2 + v_3^2 = |\mathbf{v}|^2$ (the same as $v^2$ in your notation).