I sort of asked a version of this question before and it was unclear; try I will now to make an honest attempt to state everything clerly.
I am trying to evaluate the following, namely $\nabla w = \nabla |\vec{a} \times \vec{r}|^n$, where $\vec{a}$ is a constant vector and $\vec{r}$ is the vector $
Now here's the part that I'm confused. How do we extend the chain rule over when dealing with the gradient? Do I take $\nabla |\vec{a} \times \vec{r}|^n$ to be equal to $\nabla |\vec{u}|^n$ $\times$ $\nabla (\vec{a} \times \vec{r})$, where $\times$ denotes the cross product?
The first bit $\nabla |\vec{u}|^n$ is easy, it just evaluates to $n|\vec{a} \times \vec{r}|^{n-2} (\vec{a} \times \vec {r})$, remembering that $\vec{u} = \vec{a} \times \vec{r}$.
I am guessing that $\nabla |\vec{a} \times \vec{r}|^n$ $\neq$ $\nabla |\vec{u}|^n$ $\times$ $\nabla (\vec{a} \times \vec{r})$, as to even speak about $\nabla (\vec{a} \times \vec{r})$, i.e. the gradient of a vector we would have to talk about either the cross product or dot product of the gradient and $\nabla (\vec{a} \times \vec{r})$
By the way, I am told the answer given is $\nabla |\vec{a} \times \vec{r}|^n$ = $n|\vec{a} \times \vec{r}|^{n-2} \Big(\vec{a} \times (\vec{r} \times \vec{a})\Big)$.
So let's say that I try a component wise approach, i.e. we look first at $\frac{\partial w}{\partial x_1}$. Then is it true (I could be wrong) that:
$\frac{\partial w}{\partial x_1} = n|\vec{a} \times \vec{r}|^{n-2} \quad \vec{u_1} \times \frac{\partial}{\partial x_1} \Big(\vec{a} \times \vec{r}\Big) = n|\vec{a} \times \vec{r}|^{n-2} \quad \vec{u_1} \times \Big(\vec{a} \times \frac{\partial\vec{r}}{\partial x_1}\Big)$, as $\vec{a}$ is a constant vector? Here $\vec{u_1}$ denotes the first component of the vector $\vec{a} \times \vec{r}$.
I would really aprreciate an interpretation of this, it is just that I am confused about what to take and the meanings of these operations.