How do I prove that a non-differentiable point of a function is a local maximum? Determine global and local maximum/minimum points of :
$f(x,y) = \ln(1-x+y)+x-\sqrt{|y|}$ 
over its domain.
So I figured out that the only possible local maximum is (0,0), where $f$ is not differentiable. I think I should now show that there exist an $\epsilon >0$ such that $f(x,y)\le f(0,0)=0$  for $\sqrt{x^2+y^2} \lt \epsilon$ .
However, I don't know how to prove it. Any suggestions?
 A: We split up the problem and define
$$
f_1(x, y) = \ln (1-x+y) + x - \sqrt{y}\quad \quad y \geq 0, x \leq y+1
$$
and solve that for
$$
\nabla f_1(x, y) = (\frac{-1}{1-x+y} + 1, \frac{1}{1-x+y} -\frac{1}{2\sqrt{y}})= \mathbf{0},
$$
then 
$$
\begin{align}
y &= x \\
\sqrt{y} &=\frac{1}{2}(1-x+y) 
\end{align}
$$
which gives $x = \frac{1}{4}, y= \frac{1}{4}.$ We inspect the Hessian,
$$
\nabla^2 f_2(x, y) = 
\begin{bmatrix}
\frac{1}{(1-x+y)^2} & \frac{-1}{(1-x+y)^2} \\ 
 \frac{-1}{(1-x+y)^2} & \frac{-1}{(1-x+y)^2} + \frac{1}{4}y^{-3/2}
\end{bmatrix}
$$
at $(0.25, 0.25)$
$$
\nabla^2 f_2(x, y) = 
\begin{bmatrix}
1 & -1 \\ 
 -1 & 1
\end{bmatrix}
$$
which has a positive $\lambda_1 = 1 + \sqrt{2}$ and a negative $\lambda_2 = 1 - \sqrt{2}$ eigenvalue. Thus this is a saddle point.
Moving on to the halfplane where $y\leq 0$, define
$$
f_2(x, y) = \ln(1-x+y) + x -\sqrt{-y} \quad \quad y \leq 0, x \leq 1 + y
$$
and solve for 
$$
\nabla f_2(x, y) = (\frac{-1}{1-x+y} + 1, \frac{1}{1-x+y} +\frac{1}{2\sqrt{y}})=  \mathbf{0}
$$
which implies
$$
\begin{align}
y &= x \\
-2\sqrt{y} &= 1-x+y
\end{align}
$$
Now $\sqrt{y} = -1/2$ which we are going to throw away as we're not interested in complex solutions. Thus our system permits only a single critical point, i.e. $(0.25, 0.25)$. Now we have examined our function at all points where it is differentiable. 
But where have the maximums and minimums gone? We do some parametrizations to see what happens at infinity:
Let $y = 0, x = -t$ for $t\geq 0$, then
$$
g_1(t) = f(x(t), y(t)) = \ln(1 + t) - t
$$
which is unbounded below. Our functions permits no global minimum.
Let $x(t) = y(t) = t$ for $t \geq 0$ and observe that
$$
g_2(t) = f(x(t), y(t)) = 0 + t - \sqrt{t}
$$
is unbounded above. Our function permits no global maximum.
Moving on to the point your question originally concerned, $x=0,y=0$. What happens there? This is a point where we're gonna struggle in defining a critical point without understanding subdifferentials. 
