Vector Derivatives Demonstation i would like to demonstrate this derivative
$ J =  - \left(p + \frac{1}{2} v^2 \right) \boldsymbol{v} \cdot \boldsymbol{n}$
$ \dfrac{\partial J}{\partial \boldsymbol{v}} = - \left(p + \frac{1}{2} v^2 \right) \boldsymbol{n} - \left( \boldsymbol{v} \cdot \boldsymbol{n} \right) \boldsymbol{v}   $
Thanks for help
 A: This is easy using components. You have
$$
J=-\left(p+\frac{1}{2}\sum_{i=1}^3v_i^2\right)\sum_{j=1}^3v_jn_j.
$$
Then,
$$
\frac{\partial J}{\partial v_k}=-\left(p+\frac{1}{2}\sum_{i=1}^3v_i^2\right)n_k-v_k(\sum_{j=1}^3v_jn_j).
$$
Getting back from components to vectors, you are done.
A: In this special case, you can also consider $J$ as it was a function of a "single variable" $\boldsymbol{v}$:
$$J=f(\boldsymbol{v})\cdot g(\boldsymbol{v})$$ with
$$f(\boldsymbol{v})=- p - \frac{1}{2} \boldsymbol{v}\cdot\boldsymbol{v} $$
and
$$g(\boldsymbol{v})= \boldsymbol{v} \cdot \boldsymbol{n}$$
and apply product rule:
$$J'=f'(\boldsymbol{v})\cdot g(\boldsymbol{v})+f(\boldsymbol{v})\cdot g'(\boldsymbol{v}) = \\=-\boldsymbol{v}(\boldsymbol{v} \cdot \boldsymbol{n})+\left(- p - \frac{1}{2} \boldsymbol{v}\cdot\boldsymbol{v}\right)\cdot \boldsymbol{n}=\\= - \left(p + \frac{1}{2} v^2 \right) \boldsymbol{n} - \left( \boldsymbol{v} \cdot \boldsymbol{n} \right) \boldsymbol{v}$$
NOTE In generale it's recomended to proceed by components as Jon did.
