4

Is it true that if I have some function $f(x,y)$, for which partial derivatives exist but it's not continuous, that this function cannot be differentiable (total differential doesn't exist)? But if my function is continuous and the partial derivatives do exist (and are also continuous), then it must be differentiable?

I am confused, for a long time. I have found some examples but I just want to be clear.

Leif
  • 1,493
  • 13
  • 26
  • How can partial derivatives exist at a point where the function isn't even defined (not continuous)? – Khalid T. Salem Jun 14 '17 at 02:03
  • 1
    @KhalidT.Salem What? –  Jun 14 '17 at 02:07
  • 1
    Partial derivatives can exist, they just aren't continuous, right? – Leif Jun 14 '17 at 02:09
  • And the continuity of these partial derivates I can get if I take a limit of them... then the total differential exists? How actually I can find out that it exists? Like I have seen the definition with $''Lh''$ as the total differential but it was written implicitly. – Leif Jun 14 '17 at 02:17
  • @Leif under right conditions total derivative can be expressed via Jacobian matrix – user160738 Jun 14 '17 at 03:00

3 Answers3

3

Take the function

$$f (x,y)=(x^2+y^2)\cos (\frac {1}{\sqrt {x^2+y^2}}) $$ and $f (0,0)=0$.

it is differentiable at $(0,0) $ but the partial derivatives are not continuous at $(0,0) $.

3

Here is a rough sketch of how you prove continuous first partials implies differentiability.

A function $f$ is differentiable at $x$ iff the change $f(x+h)-f(x)$ can be approximated by a linear map with a remainder term which is $o(h)$.

If a function has first partial derivatives defined at $x$ then it has arbitrary directional derivatives at $x$

A generalisation of the mean value theorem shows that in a small region, you can approximate the change by $f(x+h) - f(x)$ about $x$ by the values of the directional derivative of $f$ in the direction $h$ on the line segment joining $x$ and $x+h$.

If you construct a map $L$ which takes a vector and returns the directional derivative of $f$ in that direction, you will find that it is linear. If the partials are continuous, then you can prove that the remainder $f(x+h) - f(x) - Lh$ is $o(h)$ so $L$ is the derivative of $f$ at $x$.

I used this as a reference: https://www.math.ucdavis.edu/~hunter/book/ch13.pdf

Bernard W
  • 2,141
1

In two dimensions, differentiability always implies continuity. Because of this, the idea of a multi variable function having existing partials without continuity seems impossible. However, there is a small workaround. If we consider the definition of a partial derivative (assuming 3-D for now) it looks like this: $$\frac{\delta f(x, y)}{\delta x}=\lim_{h\to 0}\frac{f(x+h,y)-f(x,y)}{h}$$ This can evaluate without issue without the function being "continuous with respect to $y$", or more precisely, without $f(k, y)$ being continuous for some $k$. However, the function must be "continuous with respect to $x$", or more precisely $f(x, k)$ must be continuous. An example of such a function can be found below: $$f(x, y) = \begin{cases} x+1, &y\geq 0 \\ x^2, &y<0 \end{cases} $$ Take for example point $(0, 0)$. The function evaluates to $1$ at this point, however it is not continuous since $$\lim_{y\to 0}{f(0,y)}=0$$ However, if we plug this equation into the definition of the derivative, we get $$\frac{\delta f(x, y)}{\delta x}= \begin{cases} 1, & y\geq 0 \\ 2x, & y<0 \end{cases}$$ In the end, you are right in asserting that this entire function cannot have all partial derivatives defined everywhere, as this would require continuity everywhere.


For your second question, this is true. The differentiability of a multi variable function is implied by the existence and continuity of all partial derivatives. Because of this, your function having existing continuous partial derivatives everywhere necessarily means it is differentiable.

  • I'm not sure I agree with your last two paragraphs. First, a continuous function can have partial derivatives defined everywhere, but not have them be continuous. See, for example http://www.math.tamu.edu/~tvogel/gallery/node18.html. Second, I have not seen anyone define differentiability via existence and continuity of all partial derivatives (though I've only read a small number of sources). What I have seen (e.g., in Marsden's book) is that a multivariate function $f(\vec{x})$ is differentiable at $\vec{x}_0$ if there is a linear map $A$ with .... – Jason DeVito - on hiatus Jun 14 '17 at 04:11
  • $\lim_{\vec{x}\rightarrow \vec{x}_0} \frac{|f(\vec{x}) - f(\vec{x_0}) - A\vec{x}|}{|\vec{x}-\vec{x}_0|} = 0.$ It is then a theorem that if all the partials existence and are continuous, then $f$ is differentiable. In fact, in this case, $A$ is the matrix of partials evaluated at $\vec{x}_0$. Finally, there are known examples where all the partials exist everywhere, but the function is nonetheless not differentiable. – Jason DeVito - on hiatus Jun 14 '17 at 04:14
  • I used wikipedia for my definition of differentiability, which says that "if all the partial derivatives of a function exist and are continuous in a neighborhood of a point, then the function is differentiable at that point." Admittedly, I have not looked into this much either. However, if you read carefully, what I say does not dispute your second sentence (which I agree with). What is new to me however is what you said in the last sentence, can you show me an example? – DreamConspiracy Jun 14 '17 at 04:38
  • I just added a "continuous" to the last sentence which I realize now is necessary to make it correct. Sorry if this created any confusion. – DreamConspiracy Jun 14 '17 at 04:42
  • I agree with wikipedia that those conditions guarantee that the function is differentiable, but they are not the definition of differentiable. According to https://en.wikipedia.org/wiki/Differentiable_function#Differentiability_in_higher_dimensions, the function $f(x,y) = \begin{cases} \frac{y^3}{x^2 + y^2} & \text{ if } (x,y)\neq (0,0)\ 0 & \text{ if } (x,y) = (0,0)\end{cases}$ is continuous everywhere, with partials existing everywhere, but is nonetheless not differentiable at $(0,0)$. I confess I haven't checked the details to verify it. – Jason DeVito - on hiatus Jun 14 '17 at 04:43
  • Also, there are examples where the partials exist everywhere and are discontinuous, but the function is still differentiable everywhere. Salahamam_Fatima's answer has an example of one. So, adding the word "continuous" there doesn't fix my confusion ;-). In any event, it's really not a big deal, and now I feel like I'm badgering you. I can stop commenting if you'd prefer. – Jason DeVito - on hiatus Jun 14 '17 at 04:46
  • No, by all means keep commenting, I live for these conversations. And yes, I agree with your point there and will change my answer accordingly. I'll also take another more in depth look at the function in Salahamam_Fatima's answer, as I find this quite interesting. You also said you disagreed with my second to last paragraph, is this still the case and if so how come? – DreamConspiracy Jun 14 '17 at 04:50
  • For the penultimate paragraph, to me, it reads as if you're claiming that the existence of partials forces a function to be continuous. The link in my first comment contains a counterexample to this claim. Perhaps I am just misreading your paragraph. – Jason DeVito - on hiatus Jun 14 '17 at 04:53
  • Without formally attempting the limit at $(0, 0)$ in the function in your first comment, it seems to be continuous based on a few points I plugged in. Do you have a proof that it is not continuous at that point? Or am I misunderstanding your argument? – DreamConspiracy Jun 14 '17 at 04:59
  • Also, as a very informal proof for my claim in the penultimate paragraph, find $f_x$ and $f_y$, and from that you can find any directional derivative around some point. These derivatives, since they are effectively one dimensional derivatives, then imply continuity in any direction, and so (I would think) continuity at the point. Is there something I'm missing here? – DreamConspiracy Jun 14 '17 at 05:03
  • Oops: you're right, that one is continuous (but the partials are discontinuous). Here is a discontinuous example with all partials of all orders existing everywhere: https://math.stackexchange.com/questions/456581/is-there-a-discontinuous-function-on-the-plane-having-partial-derivatives-of-all. The problem with your informal proof is that having directional derivatives (which, it's not clear to me if this follows from the existence of $f_x$ and $f_y$ is not clear to me) would give continuity along each line through the origin. But continuity along all lines doesn't mean continuous.... – Jason DeVito - on hiatus Jun 14 '17 at 05:04
  • everywhere. See, for example, http://www.math.tamu.edu/~tvogel/gallery/node15.html. In any case, I need some sleep. I'd be happy to continue this tomorrow; feel free to email me. You can find out how by following the link in my profile. – Jason DeVito - on hiatus Jun 14 '17 at 05:08