6

We know $|x| = \sqrt(x^2)$, determine the second derivative

$\frac{d^2}{dx^2}|x|$,

So the first derivative is sgn(x), but how do I get the second?

JohnDoe
  • 465

3 Answers3

8

HINT:

Consider the graph of $sgn(x)$. What does it look like? What kind of slope does it have?

  • Two horizontal lines from Y = -1 and Y = 1, so the slope is 0 but at X = 0 the slope becomes undefined. True? – JohnDoe Sep 17 '17 at 13:49
  • Yes, this is not defined in $x=0$. However, you should already know that from the first derivative (where the derivative in $x=0$ is not defined). – Niki Di Giano Sep 17 '17 at 13:53
  • In fact, the derivative of $|x|$ is not exactly e qual to the signum function, because you already need to restrict the domain to $\mathbb{R} - {0}$. This won't allow you to even consider what happens around $x=0$ to differentiate again, because while it is part of the domain of $sgn(x)$, it is not part of the domain of $\frac{d}{dx} |x|$. – Niki Di Giano Sep 17 '17 at 14:17
  • Ok I'm lost, so I shouldn't try to get the derivative of sgn(x)? – JohnDoe Sep 17 '17 at 14:22
  • Actually, you are not left exactly with the $sgn$ function. However, since the only point that is missing in the derivative of $|x|$ is the point at zero, using directly the signum function to differentiate is not that big a problem. You cannot say, though, that the derivative of $|x|$ and the signum function are exactly the same thing, because although they have exactly the same effect in their domains, they do not range over the same domain. – Niki Di Giano Sep 17 '17 at 14:31
  • What you're left with is some function $f'(x)$ that behaves exactly like $sgn(x)$, except in $x=0$ where it is not defined. So you don't even need to consider what happens at 0 if you differentiate $f'(x)$. – Niki Di Giano Sep 17 '17 at 14:34
  • If I go back to $\sqrt(x^2)$ and write it as $f(g(x))$ where $f(x) = \sqrt(x)$ and $g(x)= x^2$, then can I get the derivative as $f'(g(x)) * g'(x)$ which would be $2x/2|x|$ which is $x/|x|$ then the second derivative would be using $f(x)/g(x)$ where $f(x) = x$ and $g(x)=\sqrt(x^2)$ which would give me $|x| - x/|x|$ as the second derivative. Or am I just going crazy – JohnDoe Sep 17 '17 at 14:54
  • It would be $|x|/x^2 - 1/|x|$, which is a constant null function not defined in $x=0$. – Niki Di Giano Sep 17 '17 at 15:02
  • ehhh thanks for trying but I'll just give myself an incomplete on this assignment. – JohnDoe Sep 17 '17 at 15:07
7

Considering derivative of discontinuity as del(x). Derivative of sgn(x) would be 2*del(x), as there exist a discontinuity at x=0 and a change in step by 2 units (from -1 to +1).

Note : This method is being used in mathematical modeling of signals. Where del(t) is an unit impluse function. And sgn is made up of two step functions.

codenio
  • 171
  • 1
  • 4
6

You know that

$sgn(x)=\begin{cases} 1 & x>0 \\ 0 & x=0 \\ -1 & x<0 \end{cases}$

I think you can get the derivative from there, derivate each piece of the function. Notice the discontinuity points and consider how this affects the existence of derivative at some points.

Cure
  • 4,051