Let $\bar{x}\in\mathbb{R}^n$ and $f:\mathbb{R}^n\rightarrow\mathbb{R}$ be a $C^2$ function.
We have known that if $\nabla f(\bar{x})=0$ and $\nabla^2f(\bar{x})>0$, i.e. $\nabla^2f(\bar{x})$ is positive definite, then $\bar{x}$ is a strict local minimum of $f$ and moreover the linear perturbation of $f$, the function $f_v(x):=f(x)+v^Tx$ also has a strict local minimum point for each $v$ with sufficiently small norm. Moreover the condition $\nabla^2f(\bar{x})>0$ implies $f$ is locally convex around $\bar{x}$. This fact motivates us to the following question:
Suppose that $\bar{x}$ satisfies the following properties.
There exists $r>0$ such that:
- $\bar{x}$ is unique local minimum of $f$ on $\overline{B}(\bar{x},r)$;
- The linear perturbation function $f_v(x):=f(x)+v^Tx$ has a unique local minimum in $\overline{B}(\bar{x},r)$ for each $v$ with sufficiently small norm.
Here $\overline{B}(\bar{x},r)$ is the closed ball with center $\bar{x}$ and radius $r$.
Could we conclude that $f$ is locally convex around $\bar{x}$.
Thank you for all answers, constructive comments and useful references.
My question is related to the following topics:


Before proving your conjecture, let me clarify what I mean by convexification of a function.
Notation:
Naturally, $g$ is convex iff it equals to its convexification $\mathop{co}(g)$.
Proof of the conjecture. For contradiction, suppose that there is a $C^1$ function $f:\Bbb R^n \to \Bbb R$, that is not locally convex at $0$, but there exist $r>0$ and $\delta>0$ such that the following conditions hold:
From the Condition 1 it follows that $\nabla f(0)=0$. Since $f$ is $C^1$, $\nabla f(x)$ is continuous, and so it converges to 0 as $x\to 0$. Let $0<\varepsilon<r$ be such that $\nabla f(x)\in B_\delta$ for all $x\in B_\varepsilon$.
Since $f$ is not locally convex at $0$, it is not convex on any neighborhood of the origin, specifically $f|_{B_\varepsilon}\neq \mathop{co}(f|_{B_\varepsilon})$, where $f|_{B_\varepsilon}$ denotes the restriction of the function $f$ to $B_\varepsilon$. Pick any $x^*\in B_\varepsilon$ such that $f(x^*) \neq y^* := \mathop{co}(f|_{B_\varepsilon})(x^*)$. Consider the supporting hyperplane $H$ of $\mathop{epi}(f|_{B_\varepsilon})$ at the point $(x^*,y^*)$, and write it as $$ H = \big\{ (x,y)\in \Bbb R^{n+1}: y + v^T x = y^* + v^T x^* \big\} $$ for some $v\in \Bbb R^n$. Since $f(x^*)\neq y^*$, the supporting hyperplane must touch the graph of $f$ at multiple points on $B_\varepsilon$. Let $x_0$ be any of those points. The hyperplane $H$ has to be tangent to the graph of $f$ at this point, thus $v=\nabla{f}(x_0)\in B_\delta$. However, this is a contradiction with the Condition 2, as it follows that the perturbation $f_v$ has multiple local minima on $B_{r}$.