Proving multivariable non-differentiability using this particular definition

So I've been asked to prove non-differentiability using this particular method, and I'm a bit lost. I'm supposed to prove that $f(x,y) = |x-y|$ is not differentiable along the $x=y$ line. To do it, I'm supposed to use this definition of differentiability:

A function $f$ is called differentiable at a point $a$ in it's domain if there exists a vector $c\in\mathbb{R^{n}}$ such that:

$$\lim\limits_{\bf h \to \bf 0} \frac{f(\boldsymbol a + \boldsymbol h) - f(\boldsymbol a) - \boldsymbol c \cdot \boldsymbol h}{|h|} = 0$$

Okay, so obviously $c$ would be the gradient of $f$ at that point, and obviously it won't exist because there is an apex there, but I can't for the life of me prove that it doesn't exist. Any help would be appreciated.

-
Do you know that if a function is differentiable at a point, then all directional derivatives exist at that point? – wj32 Nov 22 '12 at 4:24
yeah I do... I guess that follows from this definition, since c is grad(f)... So I guess I could use that fact. Its annoying that they're asking to use this method... – Harris M Snyder Nov 22 '12 at 5:11

Consider the point ${\bf a}=(a,a)$ for some $a\in{\mathbb R}$. Assume that $f$ is differentiable at ${\bf a}$ according to the above definition. As $f({\bf a})=0$ we would then simultaneously have $$\lim_{{\bf h}\to{\bf 0}}{f({\bf a}+{\bf h})-{\bf c}\cdot {\bf h}\over |{\bf h}|}=0\ ,\quad \lim_{{\bf h}\to{\bf 0}}{f({\bf a}-{\bf h})-{\bf c}\cdot(-{\bf h})\over |{\bf h}|}=0\ ,$$ and therefore $$\lim_{{\bf h}\to{\bf 0}}{f({\bf a}+{\bf h})+f({\bf a}-{\bf h})\over |{\bf h}|}=0\ .\qquad(*)$$ For real $h>0$ put ${\bf h}:=(h,-h)$. Then $|{\bf h}|=\sqrt{2} h$ and $$f({\bf a}+{\bf h})+f({\bf a}-{\bf h})=\bigl|(a+h)-(a-h)\bigr|+\bigl|(a-h)-(a+h)\bigr|=4h\ .$$ As $$\lim_{h\to 0+}{4h \over\sqrt{2} h}=2\sqrt{2}\ne0\ ,$$ condition $(*)$ is not fulfilled at this point ${\bf a}$.

-
Okay, I follow that logic: a + h and a - h are approaching the apex from opposite directions. I'm not sure that I understand why that equation follows from the definition though. Basically negative c dotted with h has to equal f(a-h) - f(a), which I only kind of understand. Are we just saying that the limit must be the same when approached from above and below? – Harris M Snyder Nov 22 '12 at 21:37
@Harris M Snyder: See my edit; it should be clear now. – Christian Blatter Nov 23 '12 at 9:22
Ah yes now I see, thank you very much – Harris M Snyder Nov 25 '12 at 17:33

Let $x \in \mathbb{R}$, $h>0$, then

$$\left|\frac{f((x,x)^T+h \cdot e^1)-f((x,x)^T)-1 \cdot h}{|h|} \right| = \left| \frac{|(h,0)^T|-1 \cdot h}{h} \right| \stackrel{h>0}{=} 0$$

On the other hand

$$\left|\frac{f((x,x)^T+h \cdot e^1)-f((x,x)^T)+1 \cdot h}{|h|} \right| = \left| \frac{|(h,0)^T|+1 \cdot h}{-h} \right| \stackrel{h<0}{=} 0$$

for $h<0$ where $e^1:=(1,0)^T$. This means that $f$ is not differentiable at $(x,x)$ (...since the previous equations show that $\partial_x f$ does not exist. Or if you want to prove it straight from the definition of differentiability: The first equation equation shows $c \cdot (h \cdot e^1) =c_1 \cdot h \stackrel{!}{=} 1 \cdot h$ whereas the second one shows $c \cdot (h \cdot e^1) = c_1 \cdot h \stackrel{!}{=} -1 \cdot h$ - and there exists obviously no such $c=(c_1,c_2) \in \mathbb{R}^2$.)

Similar proof works for $n \geq 3$.

-
I'm not completely able to follow. Are you using superscript T to represent matrix transpose? – Harris M Snyder Nov 22 '12 at 23:04
Yes, that's right. If you prefer it, you can simply forget about the $T$ and read $(\cdot,\cdot)$ as a vector in $\mathbb{R}^2$. – saz Nov 23 '12 at 6:54
Thank you, this post was helpful – Harris M Snyder Nov 25 '12 at 17:34