I'm reading Baraff's '98 paper: http://run.usc.edu/cs599-s10/cloth/baraff-witkin98.pdf
He defines condition vector functions that equal zero $C(x(t))=0$. An energy function is defined using a vector function:
$$ E_c(x)=\frac{1}{2}k*C(x(t))^TC(x(t)) $$
The confusion comes from equation (7). (7) comes from computing the partial derivative of $\frac{\partial E_c(x)}{\partial x}$. Applying the chain rule, I imagine it would look something like:
$$ \frac{\partial E_c(x)}{\partial x}=k*C(x(t))*\frac{dx}{dt} $$
Could anyone clear up how to obtain the correct result in equation (7)? I must be miss-applying the chain rule, but am still a bit new to vector calculus (especially in regards to total vs partial derivatives).
For convenience, here's equation (7):
$$ f_i=-\partial \frac{E_c}{\partial x_i}=-k\frac{\partial C(x)}{\partial x_i}C(x) $$
Here's a screenshot of the relevant section from the above paper:

If $E(x) = { 1\over 2} \|C(x)\|^2$ then $DE(x) = C^T(x) DC(x)$, or ${\partial E(x)\over \partial x} = C^T(x) {\partial C(x)\over \partial x} $.
Hence ${\partial E(x)\over \partial x_i} = {\partial E(x)\over \partial x} e_i = C^T(x) {\partial C(x)\over \partial x}e_i = C^T(x) {\partial C(x)\over \partial x_i} = \sum_k [C(x)]_k [{\partial C(x)\over \partial x_i}]_k$.