Partial derivatives - simple

34 Views Asked by At

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?