Derivative of |x|: Solving & Explaining

  • Thread starter Thread starter adjacent
  • Start date Start date
  • Tags Tags
    Derivative
adjacent
Gold Member
Messages
1,552
Reaction score
62

Homework Statement


Find $$\frac{\text{d}}{\text{d}x}|x|$$


Homework Equations



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##?
 
Physics news on Phys.org
adjacent said:
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.

Right .

adjacent said:
And what's the derivative at ##x=0##? ##0##?

There is no derivative at x=0 . The function is not differentiable at x=0 .
 
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.
 
##\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:
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## ?
 
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}$$
 
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.
 
micromass said:
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

Clever. I like that.
 
Thanks everyone, I think I get it now.
 
  • #10
matineesuxxx said:
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}$$


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}$$
 
  • #11
1MileCrash said:
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}$$

Good recommendation . Thanks. :smile:

I will follow that.
 
  • #12
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.
 
Back
Top