Grad(f) in index notation

index-notationvector analysis

If $f(\mathbf{r})=\vert\mathbf{r}\vert^4$

How would you calculate $\operatorname{grad} f$ in index notation?

I get that $\vert\mathbf{r}\vert^2=x_ix_i$ but how do I represent $f$ in index notation?

Best Answer

The gradient of a scalar field is contravariant (known as one-form). In index notation $$[grad(f)]^n=\nabla^nf=g^{rn} \nabla_{r}f=g^{rn}\partial_{n}f \tag{1}$$ where $\nabla_n $ is the covariant derivative and $g^{ij}$ is the contravriant metric tensor, and we have used the fact that $\nabla_nf=\partial_n f$ for a scalar field.

Your function $f(x^j)=|\bf{r}|^4$ can be written as $$f=(g_{ij}x^{i}x^j)^2$$ Now $$\partial_nf=\partial_n(g_{ij}x^ix^j)^2=2(g_{ij}x^ix^j)((\partial_ng_{ij})x^ix^j+g_{ij}(\delta^i_nx^j+x^i\delta^j_n))$$ $$=2(g_{ij}x^ix^j)((\partial_ng_{ij})x^ix^j+2g_{nj}x^j)$$

$$g^{rn}\partial_nf=2(g_{ij}x^ix^j)(g^{rn}(\partial_ng_{ij})x^ix^j+2x^r )$$ So the answer is dependent on your metric.

Assuming that we're working under the Cartesian metric, $g_{ij}=\delta_{ij}=constant$, the $\partial_ng_{ij} $ term vanishes, then $$[grad(f)]^r=4g_{ij}x^ix^jx^r=4x_jx^jx^r$$ $$$$

Related Question