Differentiability of the absolute value of a function

The derivative of ##f(x) = \sqrt{x}## is ##f'(x) = \frac{1}{2 \sqrt{x}}##. So, the derivative of ##f(g(x)) = \sqrt{x^2}## is ##f'(g(x)) \cdot g'(x) = \frac{1}{2 \sqrt{x^2}} \cdot 2x = \frac{x}{\sqrt{x^2}} = \frac{x}{\left | x \right |} = \mathrm{sgn(x)}##. However, this does not work for values of x = 0. Therefore, another method must be used to find the derivative of ##f(g(x))## at x =
  • #1
PFuser1232
479
20
The derivative of ##|f(x)|## with respect to ##x## is ##f'(x)## for ##f(x) > 0## and ##-f'(x)## for ##f(x) < 0##. However, it is undefined wherever the value of the function is zero. I was wondering, though, if the product of this "undefined derivative" and zero is zero.
 
Physics news on Phys.org
  • #2
MohammedRady97 said:
However, it is undefined wherever the value of the function is zero.
It does not have to be. Consider |f(x)| where f(x)=x^2, for example. It has a derivative everywhere, even at f(x)=0.
MohammedRady97 said:
I was wondering, though, if the product of this "undefined derivative" and zero is zero.
You cannot calculate a product with "undefined derivative" in it. There might be a way to avoid calculating this product, however, then the result could be well-defined.
 
  • #3
mfb said:
It does not have to be. Consider |f(x)| where f(x)=x^2, for example. It has a derivative everywhere, even at f(x)=0.
You cannot calculate a product with "undefined derivative" in it. There might be a way to avoid calculating this product, however, then the result could be well-defined.

I actually asked this question because I couldn't deal with the discontinuity in ##\frac{d|y|}{dx}## while deriving something in classical mechanics.
I wanted to show that ##\frac{d|v_r|}{dt} \hat{v}_r = \frac{dv_r}{dt} \hat{r}## where ##\hat{v}_r## is defined to be ##+\hat{r}## if ##v_r > 0##, and ##-\hat{r}## if ##v_r < 0##. How do I make make both sides equal for ##v_r < 0##?
##\hat{v}_r## is a unit vector that is always pointing in the direction of the radial velocity of a particle (i.e., it could point in the same direction, or in the opposite direction as the radial base vector), and ##v_r## is the scalar component of the radial velocity; it can be positive, negative, or zero.
 
  • #4
For negative v, converting the left side to the right one gives a minus sign for both components each, they cancel, done. That won't work at r=0 because the radial vectors are not even defined there.
 
  • #5
mfb said:
For negative v, converting the left side to the right one gives a minus sign for both components each, they cancel, done. That won't work at r=0 because the radial vectors are not even defined there.

How do I make it work for ##v_r = 0##? The equation I want to derive [geometrically] is ##a = (\ddot{r} - r \dot{θ}^2) \hat{r} + (r \ddot{θ} + 2 \dot{r} \dot{θ}) \hat{θ}##, which holds for all values of ##v_r##.
I'm trying to get from ##\frac{d|\dot{r}|}{dt} \hat{v}_r## to ##\ddot{r} \hat{r}##.
 
  • #6
MohammedRady97 said:
The derivative of ##|f(x)|## with respect to ##x## is ##f'(x)## for ##f(x) > 0## and ##-f'(x)## for ##f(x) < 0##. However, it is undefined wherever the value of the function is zero. I was wondering, though, if the product of this "undefined derivative" and zero is zero.
You are phrasing this badly! What is the product of "left" and 0? What is the product of "red" and 0?

"Undefined" means exactly that- there is NO derivative at x= 0 so you cannot multiply it by 0 or any other number. Now if you are asking about the limit, a x goes to 0, of 0 times the derivative (for x not 0), then, yes, that limit is 0.
 
  • #7
You do not need to differentiate absolute value to get your formula, you just need to write x and y coordinates in terms of ##r## and ##\theta##, then differentiate and write everything in vector form, see Wkipedia.
 
  • #8
Hawkeye18 said:
You do not need to differentiate absolute value to get your formula, you just need to write x and y coordinates in terms of ##r## and ##\theta##, then differentiate and write everything in vector form, see Wkipedia.

I can easily differentiate velocity in vector form to get acceleration in polar coordinates, but I'm trying to obtain the expression for acceleration in polar coordinates geometrically, like in the book Introduction to Mechanics by K&K.
Here's the other thread:
https://www.physicsforums.com/threads/vector-components-in-polar-coordinates.803069/#post-5041450
 
  • #10
MohammedRady97 said:
Anyone?
Just an anecdote: About 40 years ago, I was doing coordinate transform for a small robot. What I did, was to calculate the position and orientation of the "hand" and subtract from the previous position. This gave me a 6-dimensional matrix D which represented the first order derivative of the transform. Taylor's theorem then gave me [itex] \Delta X=D\circ \Delta M[/itex] where X are the Euclidean coordinates and M the motor positions. Inverting D then gave [itex]\Delta M = D^{-1}\Delta X [/itex], telling me how to step the motors in the next interval. But - at some positions det(D) approached 0, which meant that it was not possible to invert D. What we decided was that we would continue to use the old D-1 until the determinant got bigger than a predefined minimum. It worked!
 
  • #11
Very simple, define ##g(x)=x^2## and ##f(x)=\sqrt{x}##

Take the derivative of ##f(g(x))##

##\frac{d}{dx} \left [ f(g(x)) \right ] = f'(g(x)) \cdot g'(x) = \frac {1}{2 \sqrt{x^2}} \cdot 2x = \frac{x}{\sqrt{x^2}} = \frac{x}{\left | x \right |} = \mathrm{sgn(x)}##
 
Last edited:
  • #12
LAZYANGEL said:
Very simple, define g(x)=x2g(x)=x^2 and f(x)=x√f(x)=\sqrt{x}
Clever but -
[itex]\frac{d}{dx}f(g(x))=\frac{df}{dg}\frac{dg}{dx}=\frac{1}{2\sqrt{g}}2x [/itex]. The trouble lies with [itex]\frac{1}{2\sqrt{g}} [/itex], which is not defined (or finite) for g=0. In another (famous) proof I have seen a slight variation: Define [itex]g(x)=1-x^{2} [/itex] and [itex] f(x)=\sqrt{1-x}[/itex]. Then [itex] \frac{d}{dx}f(g(x))=\frac{df}{dg}\frac{dg}{dx}=\frac{-1}{2\sqrt{g}}\cdot -2x[/itex], just as before, but the singular point is no longer at 0.
 
  • #13
Svein said:
Clever but -
[itex]\frac{d}{dx}f(g(x))=\frac{df}{dg}\frac{dg}{dx}=\frac{1}{2\sqrt{g}}2x [/itex]. The trouble lies with [itex]\frac{1}{2\sqrt{g}} [/itex], which is not defined (or finite) for g=0. In another (famous) proof I have seen a slight variation: Define [itex]g(x)=1-x^{2} [/itex] and [itex] f(x)=\sqrt{1-x}[/itex]. Then [itex] \frac{d}{dx}f(g(x))=\frac{df}{dg}\frac{dg}{dx}=\frac{-1}{2\sqrt{g}}\cdot -2x[/itex], just as before, but the singular point is no longer at 0.

Yes but since you've redefined the function as ##x^{\frac{2}{2}}## and applied the chain rule, you've essentially taken the derivative of a fractional exponent.

You can say that ##\forall \: x^n## the derivative has a singularity at zero where ##n \in (0,1)##.
 

1. What is the definition of differentiability of the absolute value of a function?

The differentiability of the absolute value of a function refers to the property of a function where its derivative exists at every point in its domain. In other words, it is the ability of a function to have a well-defined slope at any given point.

2. How do you determine if the absolute value of a function is differentiable?

In order for the absolute value of a function to be differentiable at a point, the function itself must be continuous at that point and the left and right derivatives must exist and be equal. If these conditions are met, then the function is differentiable at that point.

3. Can the absolute value of a function be differentiable at a point where the function is not continuous?

No, the absolute value of a function cannot be differentiable at a point where the function is not continuous. This is because the left and right derivatives will not be equal, violating the necessary condition for differentiability.

4. What is the difference between differentiability and continuity?

Continuity refers to the property of a function where there are no sudden jumps or breaks in its graph. On the other hand, differentiability refers to the property of a function where its derivative exists at every point in its domain. While continuity is a necessary condition for differentiability, a differentiable function may not always be continuous.

5. How does the differentiability of the absolute value of a function affect its graph?

The differentiability of the absolute value of a function affects its graph by creating sharp points or corners at points where the function is not differentiable. This is because the derivative of the absolute value function is undefined at these points, resulting in a discontinuity in the slope of the graph.

Similar threads

  • Calculus
Replies
12
Views
335
  • Calculus
Replies
2
Views
980
Replies
4
Views
223
  • Calculus
Replies
25
Views
841
Replies
3
Views
1K
Replies
9
Views
1K
Replies
4
Views
834
Replies
1
Views
793
Replies
3
Views
1K
Back
Top