# Partial derivatives: Why do results vary?

When I attempt to compute $$f_{y}(0,0)$$, I first set $$x = 0$$ such that $$f(0,y) = \frac{y^2}{y^2} = 1$$, and so $$f_{y}(0,y) = 0$$. So its passes differentiability w.r.t.y near $$(0,0,f(0,0))$$.

However, if I compute this exact partial derivative using the definition of differentiation:

$$\lim_{h \to 0}\frac{f(0+h)-f(0)}{h}$$, I end up obtaining $$\lim_{h \to 0}\frac{1}{h}$$ which reveals that $$f_{y}(0,0)$$ does not exist.

How can such contradicting result be explained?

The function $$g(y)= f(0,y) = \begin{cases} 1, & y\neq 0,\\ 0, & y=0 \end{cases}$$ isn't continuous at $$y=0$$, hence not differentiable there either, so $$g'(0)=f_y(0,0)$$ doesn't exist.

• If the function is not continuous at some point, may I ask why I can still use the definition of derivatives near that point to test if $f_y$ exists? Thanks! (I understand that differentiability over some point imply continuity, but don't know why the definition of derivative can still be applied here.) – LHC2012 Nov 14 '19 at 10:32
• Well, you can always use the definition to check differentiability. It's just that if you already know that the function isn't even continuous at the point in question, then you know in advance that the limit in the definition of derivative isn't going to exist (in the proper sense, i.e., as a finite number). – Hans Lundmark Nov 14 '19 at 10:49
• @LHC2012 You can always check if the definition is satisfied... When the function is not continuous, it will always fail (the numerator does not go to zero), but you can still check! – PierreCarre Nov 14 '19 at 10:56
• @LHC2012 Partial derivatives of a function can exist even when the function is not differentiable. The latter is a much stronger condition. The function in this exercise is a classic example of this. – amd Nov 14 '19 at 18:08
• To clarify my previous comment, I was talking about single-variable functions like $g(y)$ in my answer above. (Partial derivatives of a multi-variable function may exist at a point even if the function isn't continuous there.) – Hans Lundmark Nov 14 '19 at 18:51

$$\frac{f(0,h)-f(0,0)}{h}= \frac{1}{h}.$$ This shows that $$\lim_{h \to 0}\frac{f(0,h)-f(0,0)}{h}$$ does not exist. Hence $$f_y(0,0)$$ does not exist.

• This was already stated in the question (except for forgetting to write "0," in two places). – Hans Lundmark Nov 14 '19 at 10:51

In this case you really need to use the definition, not the usual rules for derivatives. This comes from the fact that the correct expression for $$f(0,y)$$ is

$$f(0,y)=\begin{cases} 1, &y \ne 0 \\ 0, &y=0 \end{cases}$$