I am trying to work out how to solve a derivative of the form:
$${d \over dx}(M(x)M(x)^T)$$
where M is a vector.
In my case specifically, M is the (1x3) vector
$$M(x)={df(x) \over dx}$$
where f(x) is a scalar and x is a (3x1) vector.
Could I just use the product rule like this: $${d(uv) \over dx}=u{dv \over dx}+v{du \over dx}$$ if $M(x)=u$ and $M(x)^T=v$ then $${d \over dx}(M(x)M(x)^T)=M(x){d(M(x)^T) \over dx}+M(x)^T{d(M(x)) \over dx}$$ $${d \over dx}(M(x)M(x)^T)=M(x){d(M(x)) \over dx}^T+M(x)^T{d(M(x)) \over dx}$$ $${d \over dx}(M(x)M(x)^T)={df(x) \over dx}({{d^2 f(x) \over dx^2}})^T+({df(x) \over dx})^T{{d^2 f(x) \over dx^2}}$$
I assume that I made a few mistakes above. Whether you help with the general solution or my problem specifically it would be much appreciated!
Since $M_i=\partial_i f$ with $\partial_i:=\frac{\partial}{\partial x^i}$, $\sum_j\partial_i M_j^2=2\sum_j M_j\partial_i M_j=2\sum_j\partial_j f\partial_i\partial_j f$, the $i$th component of a vector perhaps best denoted as $2\nabla f\nabla^2 f$.