If $f(\mathbf{r})=G(||\mathbf{r}||^2), \mathbf{r}\in \mathbb{R}^n $ and G is just some differentiable function then what would the gradient vector $\nabla f $ be?
I got it as $\nabla f = 2\mathbf{r} G'(||\mathbf{r}||^2) .$ is this correct?
If $f(\mathbf{r})=G(||\mathbf{r}||^2), \mathbf{r}\in \mathbb{R}^n $ and G is just some differentiable function then what would the gradient vector $\nabla f $ be?
I got it as $\nabla f = 2\mathbf{r} G'(||\mathbf{r}||^2) .$ is this correct?