Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Differentiability of piecewise multivariable functions

  1. May 2, 2014 #1
    I guess my first questions is whether saying that a function is differentiable is the same as saying that its derivative is continuous. i.e. if

    [tex] \lim_{x\rightarrow{}a}f'(x)=f'(a) [/tex]
    then the function is differentiable at ##a##. Or is it just a matter of the value ##f'(a)## existing?

    Now my second question is, if the limit definition is true, then a function ##f:\mathbb{R}^n\rightarrow\mathbb{R}^m## is going to be differentiable at a point ##a## if for all ##i##

    [tex] \lim_{x\rightarrow{}a}f_{x_i}(x)=f_{x_i}(a)[/tex]
    and the directions ##i## form a basis for ##\mathbb{R}^{n-1}##, right? But is that the sufficient and necessary condition? In other words, is that a definition of differentiability?
     
  2. jcsd
  3. May 2, 2014 #2

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    If the function is differentiable, then that only means that the values ##f^\prime(a)## exist for each ##a## in the domain.
    If you want the derivative to be continuous, then we call this continuously differentiable. We also tend to call this ##C^1## functions.

     
  4. May 2, 2014 #3
    Okay, but then is the piecewise function
    [tex]
    f(x,y) = \left\{
    \begin{array}{lr}
    \frac{x^4}{x^2 + y^2} & (x,y)\neq{}0\\
    a & (x,y)=0
    \end{array}
    \right.
    [/tex]

    differentiable for all ##a\in\mathbb{R}##? So that the fact that

    [tex] \lim_{(x,y)\rightarrow{}(0,0)}f(x,y)\neq{}a [/tex]
    makes the function not continuously differentiable but still differentiable?
     
  5. May 2, 2014 #4

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    No, a differentiable function must be continuous (this can actually be proven, so it's not an extra requirement).

    But I'm confused now. Your OP talked about the continuity of the derivative, and now your talking about the continuity of the original function?
     
  6. May 2, 2014 #5
    Sorry, I confused the requirement for continuity of the derivative with the requirement for continuity of the actual function.. Forget that post.

    I think I got it though, differentiability at a point implies continuity at that point, right? So the existence of f'(a) implies that the limit as x approaches a of f(x) = f(a). Is that it?

    I guess my confusion started when piecewise functions were introduced in this, because the definition of the derivative of a piecewise function

    [tex]
    f(x) = \left\{
    \begin{array}{lr}
    y & x\neq{}0\\
    a & x=0
    \end{array}
    \right.
    [/tex]
    is
    [tex]
    f'(x) = \left\{
    \begin{array}{lr}
    dy/dx & x\neq{}0\\
    \frac{d}{dx}a & x=0
    \end{array}
    \right.
    [/tex]

    but then if say ##\frac{d}{dx}a## is defined the function should be differentiable at ##0##, but it's definitely not continuous if the function is the one in the above post. Right?
     
  7. May 2, 2014 #6

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    I don't agree with this derivative. To find ##f^\prime(a)##, you need to work with the limit definition.
     
  8. May 2, 2014 #7

    Matterwave

    User Avatar
    Science Advisor
    Gold Member

    The definition of a derivative is:

    $$f'(x)\equiv\lim_{h\rightarrow 0}\frac{f(x+h)-f(x)}{h}$$

    Taking your function at the point 0, we find:

    $$f'(0)=\lim_{h\rightarrow 0}\frac{f(h)-a}{h}=\lim_{h\rightarrow 0}\frac{y-a}{h}=\infty,\quad y(x=0)\neq a$$

    This limit does not exist if ##y\neq a## at x=0.
     
  9. May 2, 2014 #8
    Take this function for example:

    [tex]
    f(x,y) = \left\{
    \begin{array}{lr}
    \frac{x^2-y^2}{x^2 + y^2} & (x,y)\neq{}(0,0)\\
    0 & (x,y)=(0,0)
    \end{array}
    \right.
    [/tex]
    It is not continuous, right? Because
    [tex]\lim_{(x,y)\rightarrow(0,0)}f(x,y)[/tex]
    is undefined and therefore different from ##0##.

    But both ##f_x(0,0)=0## and ##f_y(0,0)=0## from the definition of piecewise derivatives. So the derivatives do exist at ##(0,0)## but the function is not continuous at that point.
     
  10. May 2, 2014 #9

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    Yes, this is a typical counterexample. But you should know that "differentiability" in two variables does not just mean that the two partial derivatives exist. If we only demanded that, then you're right that it's not enough to guarantee continuity.

    Differentiability in several variables is a much stronger condition: http://en.wikipedia.org/wiki/Differentiable_function#Differentiability_in_higher_dimensions
     
  11. May 2, 2014 #10
    So for single variable functions the existence of the derivative at a point implies continuity (i.e. differentiability implies continuity), but for multivariable calculus it's not the existence of all partial derivatives that implies continuity, it's something stronger. Correct? Does differentiability still imply continuity for multivariable functions though? Also, does the existence plus continuity of all partial derivatives imply differentiability?

    And one final question: what is the actual definition of continuity for multivariable functions?
     
  12. May 2, 2014 #11

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    Correct.

    Yes, if you take the stronger definition of differentiability. Existence of all partial derivatives is not enough.

    Yes, this can be proven.

    It's the same as the single-variable definition, but with absolute value changed by norms. So let ##f:A\rightarrow \mathbb{R}^m## be a function with ##A\subseteq \mathbb{R}^n##. This is continuous in ##a\in A## if

    [tex]\forall\varepsilon>0:~\exists \delta>0: \forall x\in A:~\|x-a\|<\delta~\Rightarrow~\|f(x) - f(a)\| <\varepsilon[/tex]

    It doesn't really matter which norm you use, all of the following norms on ##x = (x_1,...,x_n) \in \mathbb{R}^n## work:

    [tex]\|x\|_1 = |x_1| + ... + |x_n|[/tex]

    [tex]\|x\|_2 = \sqrt{x_1^2 + ... + x_n^2}[/tex]

    [tex]\|x\|_\infty = \max\{|x_1|,...,|x_n|\}[/tex]

    All of these are useful norms depending on the application in mind. The notion of continuity will not change if you use different norms. For example, the statement

    [tex]\forall\varepsilon>0:~\exists \delta>0: \forall x\in A:~\|x-a\|_2<\delta~\Rightarrow~\|f(x) - f(a)\|_2 <\varepsilon[/tex]

    and

    [tex]\forall\varepsilon>0:~\exists \delta>0: \forall x\in A:~\|x-a\|_1<\delta~\Rightarrow~\|f(x) - f(a)\|_\infty <\varepsilon[/tex]

    are totally equivalent statements and both are suitable to characterize continuity in ##a##.
     
  13. May 3, 2014 #12

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    The definition of "differentiable" for a function of two variables that is given in most Calculus texts is:

    "We say that a function, f(x,y), is differentiable at [itex](x_0, y_0)[/itex] if and only if there exist a linear function, Ax+ By, and a function [itex]\epsilon(x, y)[/itex] such that
    [tex]f(x,y)= A(x- x_0)+ B(y- y_0)+ \epsilon(x, y)[/tex]
    and
    [tex]\lim_{x\to x_0, y\to y_0} \frac{\epsilon(x, y)}{\sqrt{(x- x_0)^2+ (y- y_0)^2}}= 0[/tex]
    (You can replace the square root in that with any of the norms that micromass mentioned.)

    It can be shown that if f is differentiable, then its partial derivatives exist in some neighborhood of [itex](x_0, y_0)[/itex] and that [itex]\partial f/\partial x (x_0, y_0)= A[/itex] and that [itex]\partial f/\partial y(x_0,y_0)= B[/itex].

    While a derivative (even in a single variable) is not necessarily continuous itself, it must satisfy the "intermediate value property"- if f(a)= p and f(b)= q, then, for any r between p and q, there exist c, between a and b, such that f(c)= r. One consequence of that is that if a function is differentiable at [itex]x_0[/itex] and the two one-sided limits exist, those limits must be equal to the value of the derivative- a derivative cannot have any "jump" discontinuities.
     
    Last edited: May 3, 2014
  14. May 3, 2014 #13
    Actually I looked into it, I was wrong when I said that the function
    [tex]
    f(x,y) = \left\{
    \begin{array}{lr}
    \frac{x^2-y^2}{x^2 + y^2} & (x,y)\neq{}(0,0)\\
    0 & (x,y)=(0,0)
    \end{array}
    \right.
    [/tex]
    is not continuous at ##(0,0)## but the derivatives at that point exist. The function is not continuous at ##(0,0)## and therefore its derivatives at that point cannot exist. I'm not sure if it's some sort of convention or if it would violate something bigger if it did exist.

    I think maybe the counter example you were thinking of is the function
    [tex]
    f(x,y) = \left\{
    \begin{array}{lr}
    \frac{x^3}{x^2 + y^2} & (x,y)\neq{}(0,0)\\
    0 & (x,y)=(0,0)
    \end{array}
    \right.
    [/tex]
    which is definitely continuous at the point ##(0,0)## but not differentiable. So the "counterintuitive" thing that happens is that functions may be continuous at a point and therefore its partial derivatives may exist there, but that doesn't mean that it is differentiable there. Not that the function is not continuous, its partial derivatives exist but it is not differentiable, that is not possible, right?

    Also, are functions whose partial derivatives exist and are continuous a subset of differentiable functions? Or is it actually just another way to define differentiability? Is that also the case with existence of the derivative at a point and continuity for single variable functions?
     
  15. May 3, 2014 #14

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    You're right. I ws thinking of the following:
    [tex]
    f(x,y) = \left\{
    \begin{array}{lr}
    \frac{xy}{x^2 + y^2} & (x,y)\neq{}(0,0)\\
    0 & (x,y)=(0,0)
    \end{array}
    \right.
    [/tex]

    This is discontinuous. But all the partial derivatives do exist.

    See above, it is possible.

    No, it's a proper subset. Saying that the partial derivatives exist and are continuous is called "continuously differentiable". It implies differentiable (which is defined with the strong definition, not just demanding the partials to exist), but it is not equivalent.

    In single variables, existence of the derivative does imply continuity, but the derivative itself might not be continuous.
     
  16. May 3, 2014 #15
    So this is discontinuous because if you approach the point ##(0,0)## from different directions you get different values of the function, but its partial derivatives exist because the limits are defined in the directions ##x= 0## and ##y=0##? Could this be generalized to the statement that if the limit exists in a particular direction then the directional derivative exists for that direction?

    And in the case of
    [tex]
    f(x,y) = \left\{
    \begin{array}{lr}
    \frac{x^3}{x^2 + y^2} & (x,y)\neq{}(0,0)\\
    0 & (x,y)=(0,0)
    \end{array}
    \right.
    [/tex]
    the function is continuous, all its partial derivatives exist but I can prove that it isn't differentiable without going to the actual definition of continuity for multivariable functions by realizing that
    [tex] \lim_{(x,y)\rightarrow{}(0,0)}f_y(x,y) [/tex]
    doesn't exist and therefore ##f_y## is not continuous? Right?
     
  17. May 3, 2014 #16

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    I don't think you can prove it since it's not even true in single variables. For example, take ##f(x)=|x|##, the limit exists in both directions, but the directional derivatives (= ordinary derivative) does not.

    No, that's not correct. A function might be differentiable without the partial derivatives being continuous: http://mathinsight.org/differentiable_function_discontinuous_partial_derivatives
    So just finding that ##f_y## is not continuous does not imply that ##f## is not differentiable.
     
  18. May 3, 2014 #17
    So how do I prove that this function isn't differentiable?
     
  19. May 3, 2014 #18

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    First, find the two partial derivatives in ##(0,0)##. If the function is differentiable in ##(0,0)## then by definition there is a linear map ##J:\mathbb{R}^2\rightarrow \mathbb{R}^2## such that

    [tex]\lim_{\mathbf{h}\rightarrow 0} \frac{f(\mathbf{h}) - f(0,0) - J(\mathbf{h})}{\|\mathbf{h}\|} = 0[/tex]

    You can prove that the map ##J## satisfies

    [tex]J(x,y) = x \frac{\partial f}{\partial x}(0,0) + y \frac{\partial f}{\partial y}(0,0)[/tex]

    So can you find the two partial derivatives to find an expression for ##J##?
     
  20. May 4, 2014 #19
    In the example above f is a function ##f:\mathbb{R}^2\rightarrow\mathbb{R}##, how can I add or subtract something from ##\mathbb{R}^2## with something from ##\mathbb{R}##? Or is ##J:\mathbb{R}^2\rightarrow \mathbb{R}##?

    Also, I've just come across this example
    [tex] f(x,y)=\frac{x^4y-y^5}{x^2 + y^2}[/tex]
    which is definitely not continuous at ##(0,0)## but its derivatives are. Does that mean that this function is differentiable at ##(0,0)## but not continuous there? Isn't that supposed to be impossible?
     
  21. May 4, 2014 #20

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    Yes, you're right, that was a typo. The function is ##J:\mathbb{R}^2\rightarrow \mathbb{R}##.

    That function looks pretty continuous to me. At least, if you additionally define ##f(0,0)=0##.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Differentiability of piecewise multivariable functions
  1. Piecewise functions (Replies: 1)

  2. Piecewise function (Replies: 1)

  3. Piecewise functions (Replies: 7)

Loading...