1
$\begingroup$

Please help me to calculate the derivative of the function $\|x_+\|^2$.

Here,

$x_+ = ((x_1)_+,(x_2)_+,...,(x_n)_+)$ in $\mathbb{R}^n$

where $a_+ = \max\{a,0\}$ for $a\in \mathbb{R}$.

$||\cdot||$: Euclidean norm in $\mathbb{R}^n$.

  • 0
    Hint: Start by computing the partial derivatives.2012-02-05
  • 0
    So, in the positive region (all coordinates positive) what is this derivative? On one of the coordinate planes, not differentiable, of course. Let $I$ be a subset of $\{1,2,\dots,n\}$, and describe the derivative in the region where $x_i>0$ for $i \in I$ and $x_i<0$ for other $i$.2012-02-05
  • 0
    @GEdgar: *On one of the coordinate planes*, DIFFERENTIABLE, *of course*.2012-02-05

1 Answers 1

1

Let us introduce the function $U:x\mapsto\|x_+\|^2=\sum\limits_{i=1}^nu(x_i)$ where $u(t)=(t_+)^2$. The function $u$ is differentiable on $\mathbb R$, with derivative $u':t\mapsto2t_+$, hence the function $U$ is differentiable on $\mathbb R^n$, with gradient $\nabla U:x\mapsto2x_+$. In particular, at each $x$ in $\mathbb R^n$, $$ \frac{\partial U}{\partial x_i}=2(x_i)_+. $$ The only nontrivial step in the reasoning above might be the differentiability of $u$ at $0$. But consider that $u(0)=0$, $u(t)=0$ if $t\lt0$ and $u(t)=t^2$ if $t\gt0$, hence $|u(t)|\ll |t|$ when $t\to0$. Thus $u$ is differentiable at $0$ with $u'(0)=0$.