Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Is this function twice continuously differentiable?

$$ f(x) = \sum_{i=1}^{n}\big(\max\{0,a_i-x_i\}\big)^2 $$

where $(x,a\in\mathbb{R}_+^{n})$.

Any hints?

share|improve this question

closed as unclear what you're asking by TZakrevskiy, Davide Giraudo, Sami Ben Romdhane, Chris Janjigian, vonbrand Mar 18 '14 at 19:02

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

yes, I forgot to mention that. –  dicaranx Mar 18 '14 at 17:04
How do you define order on $\Bbb R^n$? Without that $a>x$ doesn't have much sense. –  TZakrevskiy Mar 18 '14 at 17:09

2 Answers 2

up vote 0 down vote accepted

No, it is not. Take $n=1$, $a=1$ you get $$ f(x) = \begin{cases} (1-x)^2 & \text{if $x\le 1$}\\ 0 & \text{if $x>1$} \end{cases} $$ whose first derivative is $$ f(x) = \begin{cases} -2(1-x) & \text{if $x\le 1$}\\ 0 & \text{if $x>1$} \end{cases} $$ which is not differentiable any more in $x=1$.

share|improve this answer

This function is not twice differentiable.

Take for example the case $$ f(x)=\big(\max\{0,x-a\}\big)^2=\left\{\begin{array}{lll} 0 & \text{if} & x<0 \\ (x-a)^2 & \text{if} & x\ge 0.\end{array}\right. $$ It is once differentiable and $$ f'(x)=\max\{0,2(x-a)\}=\left\{\begin{array}{lll} 0 & \text{if} & x<0 \\ 2(x-a) & \text{if} & x\ge 0.\end{array}\right. $$ Note that $f'(x)$ IS NOT differentiable at $x=a$.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.