Let $x,y\in \mathbb{R}^{n}$, I want to ask how to know whether the following limit exists or not.
$$\lim\limits_{y \to x}\frac{y-x}{||y-x||}$$
I am not sure about my answer because when I see for each component, for example when I have $x,y\in \mathbb{R}^{2}$ with $x=(x_1,y_1)$ and $y=(y_1,y_2)$, the following statement
$$\lim\limits_{(y_1,y_2) \to (x_1,x_2)}\frac{y_1-x_1}{\sqrt{(y_1-x_1)^{2}+(y_2-x_2)^{2}}}$$ simply does not exist.
My initial problem is that I want to prove the necessity condition for 2nd order optimality condition.
I have followed the steps up until this point:
Let $x$ be a local minimizer point of a $C^2$ function $f:S\to\mathbb{R}$ in a neighborhood $B\subset \mathbb{R}^{n}$ ($S \subset \mathbb{R}$ is the domain of $f$). I want to prove that the Hessian matrix of $f$ denoted by $H$ is semi-positive definite.
By Taylor Expansion and 1st order optimality necessary condition, we have $\forall y \in B$,
$$f(y)-f(x)\geq0$$
$$f(y) = f(x) + \frac{1}{2}(y-x).(H(x)(y-x)) + o(||y-x||^3)$$
$$f(y) - f(x) = \frac{1}{2}(y-x).(H(x)(y-x)) + o(||y-x||^3) \geq 0$$
Now, in the prove that I read, it says that by multiplying both sides of equation by $\frac{2z}{||y-x||^{2}}$ for any arbitrary $z \in \mathbb{R}^{n}$.
But then, I will get the following inequality
$$\frac{2(f(y)-f(x))z}{||y-x||^{2}}= \frac{(y-x).(H(x)(y-x))}{||y-x||^{2}}z+o(||y-x||)z\geq 0_{\mathbb{R}^{n}}$$
Now, if I take the limit $y\to x$, I have the initial problem. How can I show that
$$\lim\limits{y\to x}\frac{(y-x).(H(x)(y-x))}{||y-x||^{2}}z \geq 0_{\mathbb{R}^{n}} \implies z.(H(x)z)\geq 0$$
Of course I know this property : given a matrix $A_{n\times n}$, $\forall z \in \mathbb{R}^{n} Az\geq 0_{\mathbb{R}^{n}}\implies z.(H(x)z)\geq 0$
I appreciate the help!
One way to prove that the Hessian is positive semi-definite at point $x$ is to look at the all feasible directions $d = y-x$. Now write whatever you have for $f(td+x)$ and $f(x)$, for $t\in[0,1]$. If you write it down this way, then you will have $2(f(td+x)-f(x))$ on the left and $t^2 d^T H d$ plus some term which is of order $t^3$ on the right-hand side. The left hand side is non-negative for the any $t\in[0,1]$. And the $O(t^3)$ term cannot dominate $t^2 d^T H d$ when $t\rightarrow 0$. So $d^T H d\geq 0$, if the right-hand side wants to be non-negative too for any small value of $t$. And this has to be true for any feasible direction at d. If $x$ is inside the interior of the feasible set, then this means that $H$ is positive semi-definite (all directions are feasible locally). If not, then the positive semi-definiteness is only valid in the feasible directions.