Second Derivative of Abs(x) | Richard Seeking Answer

  • Context: Undergrad 
  • Thread starter Thread starter robousy
  • Start date Start date
  • Tags Tags
    Derivative
Click For Summary

Discussion Overview

The discussion centers on finding the second derivative of the absolute value function |x| with respect to x. Participants explore the mathematical properties of the function, particularly its differentiability and the presence of delta functions in the context of quantum mechanics problems.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Richard seeks the second derivative of |x| and suspects the involvement of delta functions.
  • Some participants argue that the second derivative is zero for x > 0 and x < 0, while noting that |x| is not differentiable at x = 0.
  • Others highlight the need to specify the domain when discussing differentiability, particularly at x = 0.
  • A participant suggests that the derivative of |g(x)| leads to an undefined expression when g(x) = 0 and g'(x) ≠ 0.
  • Another participant asserts that the derivative of |x^3| exists at x = 0, prompting further discussion on differentiability.
  • Some participants introduce the concept of the Dirac delta function as a way to describe the behavior of the derivative at points of discontinuity.
  • There is a contention regarding the validity of certain formulas and whether they imply differentiability at x = 0.
  • Some participants emphasize the importance of using first principles to establish differentiability rather than relying on intuition or graphical representations.

Areas of Agreement / Disagreement

Participants generally disagree on the differentiability of |x| at x = 0, with some asserting it is not differentiable while others explore the implications of delta functions in physical contexts. The discussion remains unresolved regarding the exact nature of the second derivative and the role of delta functions.

Contextual Notes

Limitations include the dependence on definitions of differentiability and the treatment of functions at points of discontinuity. The discussion also touches on the distinction between classical derivatives and generalized functions like the Dirac delta function.

robousy
Messages
332
Reaction score
1
Hi,

I have spent some time looking in Schaums, Eric Weisstein and google for the answer but cannot find it so I thought i'd see if anyone here could.

I would like to find the second derivative or |x| please. (wrt x).

I think there are some delta functions in there but would like to see where they come from.

Thank-you in advance.

Richard
 
Physics news on Phys.org
Think about it geometrically, abs(x) looks like f(x) = x for x>0 and f(x) = -x for x<0. So f'(x) = 1 for x>0 and f'(x) = -1 for x<0. The derivative of any constant is 0. So f''(x) = 0 for f = abs(x). I think the easiest way to prove it rigourously would be to use the Mean Value Theorem.
 
Hmmm, thanks for the response.

I'm reverse engineering a sakurai quantum mechanics problem involving this derivative and have found the the answer definitely contains a delta function - i.e by seeing the corrrect working I know it contains this. I just want to understand it now.
 
|x| isn't differentiable (everywhere) so you must specify the domain, and if you want to include 0 then you're stuck.
 
matt grime said:
|x| isn't differentiable (everywhere) so you must specify the domain, and if you want to include 0 then you're stuck.

:confused: While bored one lesson I'm sure I ended up proving:

Where:

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

Then:

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

Is this wrong?
 
What happens to your proof when g(x) = 0 and g'(x) != 0?
 
Hurkyl said:
What happens to your proof when g(x) = 0 and g'(x) != 0?
Erm what? Well if g(x) = 0 then:

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

Which is undefined right? Surely that makes sense as the change of the curve at that point is undefined. I'd be really interested to see if I got this right or not.
 
The derivative of |x^3| does in fact exist at x = 0.

BTW, I thought you were refuting that the derivative of the abs function is somewhere nondifferentiable, so I withdraw my implication. :smile:
 
For x> 0, |x|= x so "locally" (close to x so we are still looking only at positive numbers) |x| is the same as x and has the same derivative: 1
(You do need x> 0 so that |x|= x is true on both sides of x.)
For x< 0, |x|= -x so "locally" |x| is the same as -x and has the same derivative: -1.

Now look at x= 0 ) (|0+h|- |0|)/h= |h|/h which is 1 if h> 1 and -1 if h< 1. That is, the limit "from above" is 1 and the limit "from below" is -1. Since those two are not the same, the limit itself does not exist: |x| is not differentiable at x= 0.
That is, the derivative of |x| is 1 for x>0, -1 for x< 0 and not defined for x=0.
(A variation of the "Heavyside function" which is defined as "0 for x< 0, 1 for x> 0, not defined for x= 0".)
The second derivative is easy: Since the first derivative is a constant (1) for all x>0, the second derivative there is 0. Since the first derivative is a constant (-1) for all x< 0, the second derivative there is 0. Since the first derivative is not defined for x=0, the second derivative is not either.

That's all in terms of ordinary functions. Since you mention the Dirac delta function, you are actually talking about "distributions" (also called "generalized functions").
Although the derivative of the absolute value is not defined at 0, since that is only one point, we can talk about integrating it: let f(x) be "-1 for x< 0, 1 for x> 0, not defined for x= 0"- that is, the derivative of |x|. For any continuous function g(x), The integral, from -a to X (-a a fixed negative number, X a variable), of f(x)g(x), is simply the integral of -g(x) from -a to 0 plus the integral of g(x) from 0 to X. Since f(x) is not continuous at 0, the integral is not continuous at 0: there is a jump in the value of the integral at 0. It is easy to calculate that that jump is exactly g(0). If we were to calculate the derivative at x, we would find that the derivative is 0 at every x except 0 and is g(0) at x= 0. That is precisely the definition of the Dirac delta function.
 
  • #10
Hurkyl said:
The derivative of |x^3| does in fact exist at x = 0.

BTW, I thought you were refuting that the derivative of the abs function is somewhere nondifferentiable, so I withdraw my implication. :smile:
Oh right o.k :smile: , well err I never thought about that one. Are you sure it does exist at 0? I've not got access to any graphical tools on my home computer but other than at x=0 my formulae still works. As it gives that:

[tex]\frac{d}{dx} \left( \left|x^3 \right| \right) = 3\frac{\left|x^3 \right|}{x}[/tex]

Oh well never mind, there goes my idea lol. I might try and work it out again from first principles, see if I missed something.
 
Last edited:
  • #11
simple exercise for the reader: if f is continuous at 0, then g(x) = x|f(x)| is differentiable at 0.
 
  • #12
The derivative you want is a dirac-delta at the origin. That's what Physicists are most happy with when differentiating a step function.

Think of the first derivative as the limiting case of a function that is defined as :
(i) f(x) = 1, x > x0, x0 > 0
(ii) f(x) = -1, x < -x0,
(iii) f(x) is an s-shaped curve from (-x0,-1) to (x0,1) passing thru' O,

The second derivative is thus a bell shaped curve from -x0 to x0.
And when you make x0 --> 0, you get the dirac-delta.
 
  • #13
matt grime sorry I don't know what your talking about :frown:

But my formulae thing might still work:

[tex]\frac{d}{dx} \left( \left|x^3 \right| \right) = 3x^2 \frac{ \left| x^3 \right| }{x^3}[/tex]

[tex]\frac{d}{dx} \left( \left|x^3 \right| \right) = 3\frac{\left|x^3 \right|}{x}[/tex]

[tex]\frac{d}{dx} \left( \left|x^3 \right| \right) = 3\frac{|x|x^2}{x}[/tex]

[tex]\frac{d}{dx} \left( \left|x^3 \right| \right) = 3|x|x[/tex]

Yey! :smile:
 
  • #14
gokul, i hope you aren;'t trying to say that |x| is differentiable at the origin. it isn't.

and zurtex, rather than relying on intuition and/or a graphical calculator why don't you just work out the derivative properly? The limit as h tends to zero of (f(x+h)-f(x))/h, which is after all the definition of derivative, and shows that |x| is not differentiable at the origin since the limit is not well defined.
 
  • #15
matt grime said:
gokul, i hope you aren;'t trying to say that |x| is differentiable at the origin. it isn't.

and zurtex, rather than relying on intuition and/or a graphical calculator why don't you just work out the derivative properly? The limit as h tends to zero of (f(x+h)-f(x))/h, which is after all the definition of derivative, and shows that |x| is not differentiable at the origin since the limit is not well defined.
:frown: My formulae is not intuition, I remember working it out from:

[tex]|x| = + \sqrt{x^2}[/tex]

And then some very careful use of the chain rule.

P.S. Been meaning to ask if it was right for quite some time but kept forgetting.
 
  • #16
well, according to your formula, you appear to claim that things are differentiable (at 0) when they aren't; do it from first principles as you mentioned you were going to do and you'll get the answer for all x, not just those points where it works; you need to examine the parts where the function is zero very carefully, but the simple proof that if f is continuous at the origin, then xf(x) is differentiable there can be of some help. you make no restrictions on where your formula is valid, and thus appear to claim |x| is differentiable at 0, when it isn't, but |x|^3 is, with the derivative as you've worked out.
 
  • #17
Matt,

|x| is strictly not differentiable at x=0. But for physical systems that exhibit step function like behavior, the derivative looks like a spike at the stepping point. Physicists call this the dirac-delta function, and define it as the derivative of the step function, because they can not accept "undifferentiable" if the derivative is a physical thing. Google 'dirac-delta' to see more about this function.

Robousy,

If you are solving Sakurai problems, I'm assuming you've gone through more elementary texts like Jackson or Griffiths (E&M). You should have come across dirac-deltas in there, in solving charge density based problems for point charges.
 
  • #18
:confused: Sorry but I am getting really confused. Where have I said that |x| is differentiable at 0? In fact if you use my assume my formulae is correct then it is not!

I'll have a look over the maths, but are you saying my formulae is wrong and if so why?
 
  • #19
Gokul, I am pefectly aware of the dirac delta distribution, however mod(x) doesn't display step like properties so that information is useless, unless you wish to clarify for me what you mean by 'step like', and the delta is not a spike, though it is in approximations a limit of spikes. so what do you think a physicist would define the derivative of mod(x) to be? In you limit case you didn't state what the limit would be, but we can imagine it to be -1,0,1 for x strictly negative, zero, and strictly positive respectively.

Zrutex, in post five if we subs in g(x)=x, then we get that undefined thing, right? but later you use it to work out the derivative of |x|^3, which still has an undefined thing at the origin but is still differentiable there, so which do you want to claim? that the derivative is always undefined for g(x)=0? cos it isn't. you need to clear up these cases; the formula as is is not correct because you're omitting the 'interesting' cases. you're correct for the points where g is not zero, since f is either g or -g in some neighbourhood of such point.
 
  • #20
Sorry if this seems like I am hijacking somebodies post, if so just say so and I will make a new thread, but this really does seem relevant. Now here is my working please say if I am wrong:

[tex] \begin{align*}<br /> <br /> f(x) = |x| = +\sqrt{x^2} \\ \\<br /> f'(x) = \frac{ \frac{1}{2} 2x}{+\sqrt{x^2}} \\ \\<br /> f'(x) = \frac{x}{|x|}<br /> <br /> \end{align*}[/tex]

Whoops looks like I got x and |x| the wrong way around in my previous post. But if we carry this on, where:

[tex]y = fg(x)[/tex]

Then by chain rule:

[tex]y' = g'(x)f'g(x)[/tex]

Using previous result:

[tex]y' = g'(x)\frac{g(x)}{|g(x)|}[/tex]
 
  • #21
and if x is zero, what then? what are you going to claim 0/|0| is? It is obviously undefined as you've said. thus we cannot use your formula whenever we have a 0/0, and thus you must treat these cases differently. sometimes the function will be differentiable, sometimes not, but just using it as you've written it it is undefined for any function g when g is zero. or are we supposed to do the cancellations, and i think this then gets down to me being a fussy bugger; i like all the details worked out.
 
  • #22
Heh... Why is there a +/- in the first place? I thought it can just be sqrt and squared without all that's extra mess...
 
  • #23
O.K, I understand from the point of view of dealing with simple polynomials of finite order but what about if we had something like:

[tex]y = \left| \sin \left( \frac{1}{x} \right) \right|[/tex]

And we wanted to know y', surely it would be plain painful dealing with it a section at a time.
 
  • #24
Ebolamonk3y said:
Heh... Why is there a +/- in the first place? I thought it can just be sqrt and squared without all that's extra mess...
Erm, think about taking the square root of a negative.
 
  • #25
imaginary.
 
  • #26
[tex]|x| = + \sqrt{x^2}[/tex]

dun see the point of +/-
 
Last edited:
  • #27
Sorry I don't understand Ebolamonk3y.

|-1| = 1

If you square root -1 you get i, square that and you get -1. Where as if you square -1 you get 1 and if you then take its positive square root you get 1...
 
  • #28
|x| is not a step function. But it's first derivative is. And what we wanted was the second derivative.
 
  • #29
Something to note is that the square root function is not differentiable at zero, thus the chain rule doesn't apply in this case.

And, btw, x/|x| = |x|/x
 
  • #30
Hurkyl said:
Something to note is that the square root function is not differentiable at zero, thus the chain rule doesn't apply in this case.

And, btw, x/|x| = |x|/x
Well I've been going over the maths and it appears to work in the general form:

[tex]y = |f(x)|[/tex]

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

Iff f(x)=0 and f'(x)=0 you need to look at the algebra and cancel it down. For the eqatuion [itex]y = x^{0.5}[/itex] isn't the tangent, at x = 0, not simply y = 0? Thus dx/dy = 0 at x = 0.


Gokul43201, if you want to look at it following my formulae and not step by step as has been given before then:

[tex]\frac{d^2}{dx^2} (|x|) = \frac{d}{dx} \left( \frac{x}{|x|} \right)[/tex]

By quotiont rule:

[tex]\frac{d^2}{dx^2} (|x|) = \frac{|x| - \frac{x}{|x|} x}{{|x|}^2}[/tex]

As:

[tex]\frac{x}{|x|} = \frac{|x|}{x}[/tex]

Then:

[tex]\frac{d^2}{dx^2} (|x|) = \frac{|x| - |x|}{{|x|}^2}[/tex]

[tex]\frac{d^2}{dx^2} (|x|) = \frac{0}{{|x|}^2}[/tex]

When [tex]x \neq 0[/tex] then:

[tex]\frac{d^2}{dx^2} (|x|) = 0[/tex]
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 20 ·
Replies
20
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
10K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 17 ·
Replies
17
Views
2K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K