TITLE: Prove that $f(x,y)$ is derivable for all direction in $(0,0)$ but it is not differentiable at $(0,0)$
QUESTION [5 upvotes]: Prove that $$f(x,y)=\begin{cases}\dfrac{x^2}{y}&\text{if $(x,y)\neq(x,0)$},\\f(x,0)=0\end{cases}$$ is derivable for all direction in $(0,0)$ but it is not differentiable at $(0,0)$.

I have 3 questions:

I think that the function can be translated to $$f(x,y)=\begin{cases}\dfrac{x^2}{y}&\text{if $(x,y)\neq(x,0)$},\\\color{red}0&\color{red}{\text{if $(x,y)=(x,0)$}},\end{cases}$$ right?

To prove that has directional derivative in all direction in $(0,0)$ we need to prove that the following limit exists: $$\lim_{h\to0}\frac{f(ah,bh)-f(0,0)}{h},$$ where $\check{v}=(a,b)\in\Bbb R^2$ and $a^2+b^2=1$.
Indeed, $$\lim_{h\to0}\frac{f(ah,bh)-f(0,0)}{h}=\lim_{h\to0}\frac{\frac{(ah)^2}{bh}-0}{h}=\lim_{h\to0}\frac{a^2h^2}{bh^2}=\frac{a^2}{b}=\begin{cases}\frac{a^2}{b}&\text{if $b\neq0$},\\\color{blue}0&\color{blue}{\text{if $b=0$}},\end{cases}$$ thus the limit exists for all direction.

The text in $\color{blue}{\text{blue}}$ is correct because we know that $b$ goes in $y$-direction, and $f(x,y)=0$ if $y=0$?

To prove that $f$ is not differentiable at $(0,0)$ we can study the continuity of $f$ at $(0,0)$: $f(0,0)=0$, but $$\lim_{(x,y)\to(0,0)}f(x,y)=\lim_{(x,y)\to(0,0)}\frac{x^2}{y}\underbrace{=}_{(*)}\underset{y=x^2}{\lim_{x\to0}}\frac{x^2}{x^2}=1,$$ where in $(*)$ we have taken the curve of level $1$ of $f$, thus $f$ is not continuous at $(0,0)$. Hence, it is not differentiable at $(0,0)$.

Can we take the curve of level $1$ just "imposing" $\frac{x^2}{y}=1$ i.e. $y=x^2$, or conversely, we need to prove that for all $(x,y)\in E^*(0,0)\cap\{(x,y)\in\Bbb R^2\mid(x,y)\neq(0,0)\}$, it is $y=x^2$?

Thanks!

REPLY [3 votes]: Question 1: Yep, you can rewrite it like this. In fact, I strongly prefer this to the way it was originally written; I don't like how $f(x, y)$ appears on the right hand side of the $=$ sign. You could replace the condition $(x, y) = (x,0)$ with $y = 0$ too.
Question 2: Yes, that would be right. Again, I have some issues with how this is written out.

$$\lim_{h\to0}\frac{f(ah,bh)-f(0,0)}{h}\color{red}=\lim_{h\to0}\frac{\frac{(ah)^2}{bh}-0}{h}=\lim_{h\to0}\frac{a^2h^2}{bh^2}=\frac{a^2}{b}\color{red}=\begin{cases}\frac{a^2}{b}&\text{if $b\neq0$},\\0&\text{if $b=0$},\end{cases}$$

I don't like the $=$ signs highlighted in red. It's not true in general that $f(ah, bh) = \frac{(ah)^2}{bh}$; it makes the implicit assumption that $b \neq 0$. Similarly, the second highlighted $=$ is a second mistake, designed to correct the previous one, sneaking the $b = 0$ case back into the equation. You'll notice that the $b = 0$ case is not proven, merely asserted. No wonder you need to ask for clarification!
Question 3: You can just look at the curve $y = x^2$ (or parameterised, $(x,y) = (t, t^2)$). It is a continuous curve, passing through $(x, y) = (0, 0)$. If $f$ is continuous, then we'd expect $f(t, t^2)$ to be a continuous function of $t$, and in particular, $f(t, t^2) \to f(0, 0)$ as $t \to 0$. As this is not the case, $f$ is not continuous.