What is the derivative of a modulus function?

  • Context: Undergrad 
  • Thread starter Thread starter Zurtex
  • Start date Start date
  • Tags Tags
    Modulus
Click For Summary

Discussion Overview

The discussion centers on the derivative of a modulus function, specifically examining the expression g(|f(x)|) and the application of the chain rule in its differentiation. Participants explore various methods and notations for handling the derivative, particularly at points where f(x) may equal zero.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant proposes a detailed method for differentiating g(|f(x)|) using the chain rule and provides a piecewise definition for the derivative at f(x) = 0.
  • Another participant suggests that a simpler approach is to define the modulus function directly as Y if Y is positive and -Y if Y is negative, noting that the derivative is not defined at Y=0, but g(modY) could be differentiable at that point.
  • A later reply acknowledges that the proposed methods are equivalent in spirit, indicating that the expression f/modf simplifies to +/-1 based on the sign of f.
  • One participant expresses a desire to confirm the correctness of their method while also recognizing a mistake in their notation regarding limits.
  • Another participant notes that they prefer algebraic notation over verbal descriptions for clarity, particularly due to personal challenges with dyslexia.

Areas of Agreement / Disagreement

Participants express differing views on the complexity of the original method versus simpler alternatives. There is no consensus on which method is superior, and the discussion remains unresolved regarding the best approach to take.

Contextual Notes

Some participants highlight potential issues with notation and the handling of limits, particularly in the context of approaching zero from different directions. These aspects remain unresolved within the discussion.

Zurtex
Science Advisor
Homework Helper
Messages
1,118
Reaction score
1
Feeling a little bit more confident about my calculus skills I was hoping to check if this is correct. Let’s say you have:

[tex]g(|f(x)|)[/tex]

And you want to take the derivative with respect to x, well using the chain rule you get:

[tex]\bigl( g(|f(x)|) \bigr)' = (|f(x)|)' g'(|f(x)|)[/tex]

Looking more closly at [itex](|f(x)|)'[/itex]. Defining it as:

[tex]\left( +\sqrt{(f(x))^2} \right)'[/tex]

Then using the chain rule we get:

[tex](|f(x)|)' = 2f(x) f'(x) \: \frac{1}{2} \: \frac{1}{ +\sqrt{(f(x))^2} }[/tex]

Simplifying:

[tex](|f(x)|)' = f'(x) \frac{f(x)}{|f(x)|}[/tex]

Substituting back in the original equation and sorting out the problem of when f(x) = 0:

[tex]\bigl( g(|f(x)|) \bigr)' = \begin{cases}<br /> f'(x) \frac{f(x)}{|f(x)|}g'(|f(x)|) & \text{if $ f(x) \neq 0$} \\ \\<br /> \lim_{f(x) \rightarrow 0} \left(f'(x) \frac{f(x)}{|f(x)|}g'(|f(x)|) \right) & \text{if $ f(x) = 0$ and $ \lim_{f(x) \uparrow 0} \left( f'(x) \frac{f(x)}{|f(x)|}g'(|f(x)|) \right) = \lim_{f(x) \downarrow 0} \left( f'(x) \frac{f(x)}{|f(x)|}g'(|f(x)|) \right)$} \\ \\<br /> \text{Undefinied} & \text{if $ f(x) = 0$ and $ \lim_{f(x) \uparrow 0} \left( f'(x) \frac{f(x)}{|f(x)|}g'(|f(x)|) \right) \neq \lim_{f(x) \downarrow 0} \left( f'(x) \frac{f(x)}{|f(x)|}g'(|f(x)|) \right)$}<br /> \end{cases}[/tex]

Correct? I know it all seems a bit over the top (especially when you look at the tex for it :wink:) but I like things to be well defined and in a form like this where I understand it better.

Edit: I made a mistake, it should be correct now :smile:
 
Last edited:
Physics news on Phys.org
it is over the top. it is easier to use mod of Y is Y if Y is positive and -Y if Y is negative, the derivative not defined if Y=0, though it is conceivalbe that g(modY) is differentiable when Y=0.
 
matt grime said:
it is over the top. it is easier to use mod of Y is Y if Y is positive and -Y if Y is negative, the derivative not defined if Y=0, though it is conceivalbe that g(modY) is differentiable when Y=0.
I'm not trying to find an easier method, but rather checking that my method is correct.

Although I do not claim this method to be more useful. I think it does yeld a more accurate result over some functions than the method you use, for example if you want to find the derivative with respect of x:

[tex]\left| x^n \right| \quad n \in \mathbb{N} \backslash \negmedspace \{ 1 \}[/tex]

But really more than anything I just want to check it is correct.

Edit: I just realized a big mistake in it, but I've now edited the first post accordingly.
 
Last edited:
but they are easily seen to be equivalent, indeed your f/modf is simply +/-1 depending on whether f is positive or negative, ie you are just not using the words 'when something is positive/negative' and making it neater, so yes your method is correct in spirit though i haven't checked the detail
 
matt grime said:
but they are easily seen to be equivalent, indeed your f/modf is simply +/-1 depending on whether f is positive or negative, ie you are just not using the words 'when something is positive/negative' and making it neater, so yes your method is correct in spirit though i haven't checked the detail
Neither do I write:

The derivative of the positive square root of a squared function of x, instead I represent it like:

[tex]\left( +\sqrt{(f(x))^2} \right)'[/tex]

It just fits easier in my head if I have an algebraic notation for something rather than a word notation (probably something to do with my dyslexia but whatever). Anyway, I'm glad the spirit is right, but I think I lack the correct notation with the limits. It is meant to be x approaching from smaller values (values coming from negative infinity) to reach f(x) = 0, but instead I think I've wrote f(x) approaching from smaller values to f(x) = 0, which may not make too much sense for functions like f(x) = x2.
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 25 ·
Replies
25
Views
4K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 6 ·
Replies
6
Views
4K