Is a function of several variables convex near a local minimum when the derivatives are non-degenerate?

Let $$\begin{aligned} f(x,y) & = x^4 - x^2 y^2 + y^4 \\ & = \tfrac{1}{2} x^4 + \tfrac{1}{2} y^4 + \tfrac{1}{2} (x^2 - y^2)^2 . \end{aligned}$$ Then $f$ is a strictly positive (except at the origin, of course) homogeneous polynomial of degree $4$, and hence $d^j f(\vec 0) = 0$ for $j < 4$ and $d^4 f(\vec 0) > 0$ (indeed: $d^4 f(\vec 0)(\vec h, \vec h, \vec h, \vec h) = 4! f(\vec h) > 0$ whenever $\vec h \ne \vec 0$). On the other hand, $$\partial_{xx} f(0,y) = -2 y^2 < 0$$ whenever $y \ne 0$, and so $f$ is not convex near $0$.


Let $n=1$, $f(t)=t^2 + |t|^{7/2}\sin(1/|t|)$ for $t\ne0$, $f(0):=0$. Then $f'(0)=0$ and $f''(0)=2>0$, so that $0$ is a strict local minimum of $f$. However, $f''(t)\sim-|t|^{-1/2}\sin(1/|t|)$ as $t\to0$, and so, $f$ is not convex (let alone strictly convex) in any neighborhood of $0$.


Here are the graphs $\{(t,f(t))\colon|t|<0.1\}$ (left) and $\{(t,f''(t))\colon|t|<0.1\}$ (right).

enter image description here