Derivative of |x|: Solving & Explaining

  • Thread starter adjacent
  • Start date
  • Tags
    Derivative
We can use that to find f'(z) for all z<0. For example, if z<0, then f'(z)=-1. In summary, The derivative of the absolute value function, |x|, is undefined at x=0. This is because the function is not differentiable at x=0, meaning that there is no unique tangent line at that point. However, the derivative exists for all other points in the domain and can be calculated using the chain rule or by defining the function as f(x)=√(x^2).
  • #1
adjacent
Gold Member
1,552
63

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
  • #2
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 .
 
  • #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.
 
  • #4
##\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:
  • #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## ?
 
  • #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}$$
 
  • #7
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.
 
  • #8
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.
 
  • #9
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.
 

1. What is the derivative of |x|?

The derivative of |x| is a function that represents the rate of change of the absolute value of x with respect to x. It is equal to 1 for all positive values of x and -1 for all negative values of x.

2. How do you solve the derivative of |x|?

To solve the derivative of |x|, you can use the definition of the derivative which states that the derivative of a function at a specific point is equal to the slope of the tangent line to that point. In the case of |x|, you will need to use the left and right hand limits to determine the derivative at x = 0.

3. What is the importance of understanding the derivative of |x|?

Understanding the derivative of |x| is important because it is a fundamental concept in calculus and is used in many applications in mathematics, physics, engineering, and economics. It also helps in understanding the behavior of a function and its rate of change at different points.

4. Can you explain why the derivative of |x| is not defined at x = 0?

The derivative of |x| is not defined at x = 0 because the absolute value function is not differentiable at this point. This is because the function has a sharp corner at x = 0, and the slope of the tangent line on either side of this point is different.

5. How does the derivative of |x| compare to the derivative of x?

The derivative of |x| and the derivative of x are different functions. The derivative of x is equal to 1 for all values of x, while the derivative of |x| is equal to 1 for positive values of x and -1 for negative values of x. This means that the rate of change of |x| is not constant, unlike x where it is always equal to 1.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
262
Replies
7
Views
518
  • Calculus and Beyond Homework Help
Replies
7
Views
271
  • Calculus and Beyond Homework Help
Replies
22
Views
2K
  • Calculus and Beyond Homework Help
Replies
9
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
581
  • Calculus and Beyond Homework Help
Replies
5
Views
900
  • Calculus and Beyond Homework Help
Replies
0
Views
157
  • Calculus and Beyond Homework Help
Replies
23
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
Back
Top