If the Hessian matrix is symmetric is $\mathscr C^2$?

340 Views Asked by At

I know that, if $ f (x)$ is a $\mathscr {C}^2$ function, then the Hessian matrix is symmetric. But if the matrix is symmetric could not be $\mathscr {C}^2$; can someone give me an example?

1

There are 1 best solutions below

0
On BEST ANSWER

Take your favorite twice differentiable function $f:(-1,1)\to \mathbb{R}$ which is not in class $\scr{C}^2$. For instance, use $$ f(x)= \begin{cases} x^2\sin(1/x)&x\ne 0\\ 0&x=0. \end{cases}$$ Then take a primitive of it, i.e. define $F(x)=\int_{-1}^xf(t)dt$ so that $F'(x)=f(x)$. Now $F(x)$ is once continuously differentiable and twice differentiable but not twice continuously differentiable. Anyway, define a function $(-1,1)\times (-1,1)\to \mathbb{R}$ by $G(x,y)=F(x)$. It has Hessian $$ \begin{bmatrix} f'(x)&0\\ 0&0 \end{bmatrix} $$
which is symmetric, but yet the function is not $\mathscr{C}^2$.