1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Derivative of |x|

  1. Jul 19, 2014 #1

    adjacent

    User Avatar
    Gold Member

    1. The problem statement, all variables and given/known data
    Find $$\frac{\text{d}}{\text{d}x}|x|$$


    2. Relevant equations

    3. The attempt at a solution
    I know that ##\frac{\text{d}}{\text{d}x}x=1## but it's ##|x|##. For ##x>0##, derivative is 1 and for ##x<0##, derivative is -1.
    :confused:

    And what's the derivative at ##x=0##? ##0##?
     
  2. jcsd
  3. Jul 19, 2014 #2
    Right .

    There is no derivative at x=0 . The function is not differentiable at x=0 .
     
  4. Jul 19, 2014 #3
    To be a little bit more explicit - the derivative, formally, is defined in terms of a limit. Hence, if the left and right limits do not agree with each other, then the limit (and derivative) is undefined and do not exist at that particular point.
     
  5. Jul 19, 2014 #4

    Fredrik

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    ##\frac{|0+h|-|0|}{h}=\frac{|h|}{h}## goes to +1 as h goes to 0 from the right, and goes to -1 as h goes to 0 from the left. So the limit as h goes to 0 doesn't exist. This means that the derivative of the absolute value function is undefined at 0.

    This function isn't differentiable (meaning "differentiable at x for all x in its domain"), but it's differentiable at x for all non-zero real numbers x.

    The derivative at some other point in the domain is easy to find using the definition of the absolute value function. Start by writing that down.

    Edit: I wrote this before I saw the other replies above.
     
    Last edited: Jul 19, 2014
  6. Jul 19, 2014 #5
    Here's another way to think about it: it is not hard to see that the derivative of ##|x|## represents the sign of ##x## which is ##1## if ##x\gt0## and ##-1## if ##x\lt0##, but what is the sign of ##0## ?
     
  7. Jul 19, 2014 #6
    There is a way of defining the absolute value function in a way such that you may easily compute the derivative if you know the chain rule:

    $$|x| = \sqrt{x^2}$$
     
  8. Jul 19, 2014 #7

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    And yet another way of seeing things. The derivative is closely associated the the angle that the tangent line makes with the X-axis. So the existence of the derivative at a point is equivalent to saying that there is a (non-vertical) tangent line at that point. You can see from the graph of the absolute value

    360px-Absolute_value.svg.png

    that it is not at all clear what the tangent line at zero is supposed to be. There are many possible candidates of a tangent line at zero, and none really works that well. This illustrates the non-differentiability of the absolute value in zero.
     
  9. Jul 19, 2014 #8
    Clever. I like that.
     
  10. Jul 20, 2014 #9

    adjacent

    User Avatar
    Gold Member

    Thanks everyone, I think I get it now.
     
  11. Jul 20, 2014 #10

    Which is how I recommend always defining absolute value. Such a simple expression need not be convoluted with if thens and piecewise representations.

    I also recommend the OP simply differentiate $$|x| = \sqrt{x^2}$$
     
  12. Jul 20, 2014 #11

    adjacent

    User Avatar
    Gold Member

    Good recommendation . Thanks. :smile:

    I will follow that.
     
  13. Jul 20, 2014 #12

    Fredrik

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    That's the easiest way. An alternative is to use that if f(y)=g(y) for all y in an open interval (a,b) that contains x, then f'(x)=g'(x).

    Define f by f(x)=|x| for all x. Let z>0 be arbitrary. Let a and b be real numbers such that 0<a<z<b. Define g by g(x)=x for all x. For all x in (a,b), we have ##f(x)=g(x)##. This implies that f'(z)=g'(z)=1.

    This way we find f'(z) for all z>0. A very similar argument finds f'(z) for all z<0.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Derivative of |x|
  1. Derivative x+sqrt(x) (Replies: 1)

  2. Derivative y=√x+√x (Replies: 8)

  3. Derivative of X^(x^x)? (Replies: 1)

Loading...