In a book I ran into the following problem:
Let $ f: \mathbb {R}^2 \rightarrow \mathbb{R} $ defined as $ \displaystyle \frac{| x | y}{\sqrt {x ^ 2 + y ^ 2}} $ if $ (x , y) \neq (0,0) $ and $ 0 $ if $ (x, y) = (0,0) $.
They ask me to prove that $ f $ is continuous at $ (0,0) $, that it has all its directional derivatives in $ (0,0) $ but that $ f $ is not differentiable at $ (0,0) $, I It seems strange that it is continuous at that point but at the same time is not derivable. Is this correct? If so, how is it resolved?
Best Answer
To begin with, let us take the limit as $(x,y)$ approaches $(0,0)$. In order to do so, notice that \begin{align*} y \leq |y| = \sqrt{y^{2}} \leq \sqrt{x^{2}+y^{2}} \Rightarrow \frac{y}{\sqrt{x^{2}+y^{2}}}\leq 1 \Rightarrow \frac{|x|y}{\sqrt{x^{2}+y^{2}}} \leq |x| \end{align*} Similarly,
\begin{align*} y\geq -|y| = - \sqrt{y^{2}} \geq -\sqrt{x^{2}+y^{2}} \Rightarrow \frac{y}{\sqrt{x^{2}+y^{2}}}\geq -1 \Rightarrow \frac{|x|y}{\sqrt{x^{2}+y^{2}}}\geq -|x| \end{align*}
Due to the sandwich theorem, one concludes that $f$ is continuous. Indeed, one has that \begin{align*} \lim_{(x,y)\to(0,0)}f(x,y) = \lim_{(x,y)\to(0,0)}\frac{|x|y}{\sqrt{x^{2}+y^{2}}} = 0 = f(0,0) \end{align*}
As to the directional derivatives at $(0,0)$ along $v = (a,b)$, we have the following definition \begin{align*} \lim_{t\to 0}\frac{f((0,0) + t(a,b)) - f(0,0)}{t} & = \lim_{t\to 0}\frac{f(ta,tb)}{t}\\\\ & = \lim_{t\to 0}\frac{|ta|tb}{t\sqrt{t^{2}a^{2}+t^{2}b^{2}}}\\\\ & = \lim_{t\to 0}\frac{|a|b}{\sqrt{a^{2}+b^{2}}} = \frac{|a|b}{\sqrt{a^{2}+b^{2}}} \end{align*}
Moreover, according to the definition of the partial derivatives at $(0,0)$, we have that \begin{align*} \begin{cases} \displaystyle f_{x}(0,0) = \lim_{t\to 0}\frac{f(t,0) - f(0,0)}{t} = 0\\\\ \displaystyle f_{y}(0,0) = \lim_{t\to 0}\frac{f(0,t) - f(0,0)}{t} = 0 \end{cases} \end{align*}
Now suppose that $f$ is differentiable at $(0,0)$. Then we could express \begin{align*} Df((0,0)) = (f_{x}(0,0),f_{y}(0,0)) = (0,0) \end{align*}
Consequently, if we let $v = (a,b)$, the directional derivative along $v = (a,b)$ would be equal to \begin{align*} D_{v}f((0,0)) = \langle Df((0,0)),(a,b)\rangle = \langle (0,0),(a,b)\rangle = 0 \neq \frac{|a|b}{\sqrt{a^{2}+b^{2}}} \end{align*} which is a contradiction. Thus $f$ is not differentiable at $(0,0)$.
Hopefully this helps!