If $\nabla f(\bar{x}) (x-\bar{x}) > 0$ for some point $\bar{x}$, is $\bar{x}$ necessarily a local minimum point? Let $X$ be a convex set. Let $\bar{x}$ be a point in $X$ such that $\nabla f(\bar{x}) (x-\bar{x}) > 0$ for all $x \neq \bar{x}$, is $\bar{x}$ necessarily a local minimum point ?  This problem was given in Nonlinear programming by Bazaraa and Shetty. I don't think the statement is true  but I can't find a counterexample.
 A: Let $\ X=\big\{(x,y)\in\mathbb{R}\,|\ y\ge x^4\,\big\}\ $, $\ f(x,y)=y-x^2\ $, and $\ \overline{x}=(0,0)\ $. Then $\ \nabla f(x,y)=(-2x,1)=(0,1)\ $ at $\ (x,y)=\overline{x}\ $.  Therefore $\ \big\langle\nabla f\big(\overline{x}\big),(x,y)-\overline{x}\big\rangle=\langle(0,1),(x,y)\rangle=y>0\ $ for all $\ (x,y)\in X\setminus\big\{\overline{x}\big\}\ $.  But $\ \big(t,|\,t|^3\big)\in X\ $ for all $\ t\in[-1,1]\    $, and $\ f\big(t,|t|^3\big)=|t|^3-t^2<0=f\big(\overline{x}\big)\ $for $\ t\in(-1,0)\cup(0,1)\ $.  Therefore $\ \overline{x}\ $ is not a local minimum of $\ f\ $.
A: Here's my stab at a counterexample...
Let $X$ be the set of sequences of nonnegative real numbers and
\begin{equation*}
f(x)=\sum_{n}\frac{1}{n}\sin \left( n x_{n}\right)
\end{equation*}
\begin{equation*}
\nabla f(\bar{x})\left(x-\bar{x}\right)=\sum_{n}\left(x_{n}-\bar{x}_{n}\right)\cos\left(n\bar{x}_{n}\right)
\end{equation*}
so if $\bar{x}=0$ then $\nabla f(\bar{x})\left(x-\bar{x}\right)=\sum_{n}x_n>0$ for all $x\in X\setminus \{\bar{x}\}$.
But given any $\epsilon>0$ there is some $x$ with $\lVert x-\bar{x}\rVert<\epsilon$ such that $f(x)<0$.
