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 the absolute value of a function

  1. Mar 14, 2015 #1
    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.
     
  2. jcsd
  3. Mar 14, 2015 #2

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    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.
     
  4. Mar 15, 2015 #3
    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.
     
  5. Mar 15, 2015 #4

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    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.
     
  6. Mar 16, 2015 #5
    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}##.
     
  7. Mar 16, 2015 #6

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    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.
     
  8. Mar 17, 2015 #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.
     
  9. Mar 18, 2015 #8
    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. Mar 20, 2015 #9
  11. Mar 20, 2015 #10

    Svein

    User Avatar
    Science Advisor

    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!
     
  12. Mar 21, 2015 #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: Mar 21, 2015
  13. Mar 21, 2015 #12

    Svein

    User Avatar
    Science Advisor

    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.
     
  14. Mar 21, 2015 #13
    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)##.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Differentiability of the absolute value of a function
Loading...