Derivative of a vector field dotted with curve velocity (source code)

= Derivative of a vector field dotted with curve velocity
{title2=$\frac d{dt}[W(r)\cdot r']=r'^TJ_W(r)r'+W(r)\cdot r''$}

For a continuously <differentiable> <vector field> $W:\mathbb R^n\to\mathbb R^n$ and a twice continuously <differentiable> <parametric curve> $r$, the <product rule> and <multivariable chain rule> give
$$
\frac d{dt}\bigl[W(r(t))\cdot r'(t)\bigr]
=r'(t)^TJ_W(r(t))r'(t)+W(r(t))\cdot r''(t),
$$
where $(J_W)_{ij}=\partial_jW_i$ is the <Jacobian matrix>. Indeed, first differentiate the <dot product> to obtain $(dW(r(t))/dt)\cdot r'+W(r(t))\cdot r''$, and then substitute $dW(r(t))/dt=J_Wr'$.

The first term describes variation in the sampled <vector field>; the second records the changing <velocity vector> of the <parametric curve>. In three dimensions one may take $W=\nabla\times F$ for a sufficiently smooth <vector field> $F$. The formula then involves first and second spatial <partial derivatives> of $F$ and the <velocity> and <acceleration> of the <parametric curve>. Omitting the second term would be valid only when its <dot product> vanishes, for example for a straight path with constant <velocity>.