I have a function
$$f(x) = \frac12\|G(x)\|_2^2$$ where $G(x): \mathbb R^n \rightarrow \mathbb R^n$ is a twice continuous differentiable function. I want to determine $\nabla f(x)$ in terms of $G(x)$ and $G'(x)$. How do I derivate that norm?
I have a function
$$f(x) = \frac12\|G(x)\|_2^2$$ where $G(x): \mathbb R^n \rightarrow \mathbb R^n$ is a twice continuous differentiable function. I want to determine $\nabla f(x)$ in terms of $G(x)$ and $G'(x)$. How do I derivate that norm?
On
Note that $f=\frac12\sum\limits_{i=1}^nG_i(x)^2$, where $G=(G_i)_{1\leqslant i\leqslant n}$ hence $G_i:\mathbb R^n\to\mathbb R$. Now, by definition, $\nabla f(x)$ is the unique vector $(u_i)_{1\leqslant i\leqslant n}$ such that $f(x+h)=f(x)+u\cdot h+o(\|h\|)$ when $h\to0$, where $h=(h_i)_{1\leqslant i\leqslant n}$ and $u\cdot h=\sum\limits_{i=1}^nu_ih_i$. Here, $G_i(x+h)=G_i(x)+\nabla G_i(x)\cdot h+o(\|h\|)$ hence $G_i(x+h)^2=G_i(x)^2+2G_i(x)\nabla G_i(x)\cdot h+o(\|h\|)$ when $h\to0$. Summing these, one gets $$ \nabla f(x)=\sum\limits_{i=1}^nG_i(x)\nabla G_i(x). $$
For each $x$, $G(x)$ is a vector in $\mathbb R^n$ and $f(x) = \frac 12 G(x) \cdot G(x)$. Differentiate using the product rule.