6

Can we find the derivative of $|x^3|$ at $x = 0$?

I was trying to find the derivative of $|x^3|$ within the range of $[-1/2, 1/2]$.

I got the equation for the derivative of $|x^3| = 3x^3 / |x|$. for $x \neq 0$.

Is the equation correct?

And the other thing is I want the derivative of $|x^3|$ at $x = 0$ to obtain the full solution. How can I find it?

Any help would be appreciated.

  • 2
    Welcome to Math SE! Check out https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference for some tips on how to format the math-parts of your questions in TeX! :) – Jeremy Jeffrey James Aug 29 '21 at 16:45
  • 2
    You should show your work on that. – user Aug 29 '21 at 16:46
  • 1
    Have you tried to work out the derivative by the limit definition? What did you get? – Randall Aug 29 '21 at 16:49
  • 1
    Your formula for the derivative is correct. As $x$ goes to $0$ you can note the derivative is $0$. – Evariste Aug 29 '21 at 17:09
  • 1
    What do you think of this situation: "$f$ is even, continuously derivable on $[0,+\infty)$ and $f'(0^+)=0$" ? Do you see why the key argument is $f'(0^+)=0$ ? – zwim Aug 29 '21 at 17:10
  • 2
    I don't want to add another answer, but I want to point out that if you knew that the d|x|/dx = x/|x|, then your calculation was a correct use of this fact with the chain rule or the generalized power rule. It's just that these rules for differentiation all have this fine print: if (NOT iff) the result of the applying the rule exists, then the derivative you're seeking exists and equals your result. But they all have subtle cases where the result of the rule does not exist yet the derivative does exist, and this is an example of that. (This line of thought eventually leads to @user's answer.) – Toby Bartels Aug 29 '21 at 19:16
  • 1
    Note also that for $x\neq 0$ we have $3x|x|=3x^3/|x|$ which corresponds to the expression you have found. – user Aug 29 '21 at 19:24

3 Answers3

12

If $f(x)=|x^3|$, then by the definition of the derivative, $$ f'(0)=\lim_{x\to0}\frac{f(x)-f(0)}{x-0}=\lim_{x\to 0}\frac{|x^3|}{x} \, . $$ Since $$ \lim_{x\to0^+}\frac{|x^3|}{x}=\lim_{x\to0^+}\frac{x^3}{x}=\lim_{x\to 0^+}x^2=0 \, , $$ and $$ \lim_{x\to 0^-}\frac{|x^3|}{x}=\lim_{x\to0^-}\frac{-x^3}{x}=\lim_{x\to0^-}-x^2=0 \, , $$ we find that that $f'(0)=0$. Alternatively, we could use the following theorem:

Suppose that $f$ is an even function, and $f'_+(x)$ exists and equals $c$. Then, $f'_-(-x)=-c$.

Joe
  • 19,636
8

This is really very simple.

If $x\ge0$, then $f(x)=x^3$ has derivative $3x^2$; so the right derivative at $x=0$ is $0$.

If $x\le0$, then $f(x)=-x^3$ has derivative $-3x^2$; so the left derivative at $x=0$ is $0$.

So the left derivative is equal to the right derivative, and therefore the derivative is their common value, $0$.

TonyK
  • 64,559
  • 1
    This only works assuming the derivative exists everywhere and is continuous, which a priori we do not know. Or is there a theorem you are applying? – Jair Taylor Aug 29 '21 at 19:22
  • 1
    @JairTaylor: The derivative $f'(a)$ exists if and only if $f'+(a)$ and $f'-(a)$ both exist. Moreover, if $f(x)=|x^3|$, then $f(x)=x^3$ for $x\ge0$ and $f(x)=-x^3$ for $x\le0$. Since the derivative of $x^3$ at $0$ is $0$, the right hand derivative of $x^3$ is also $0$. Similarly for $-x^3$. – Joe Aug 29 '21 at 19:33
  • 1
    Sorry, I should have written $f'+(a)$ and $f'-(a)$ both exist and are equal. – Joe Aug 29 '21 at 19:41
  • 1
    @JairTaylor: "If the left and right derivatives are equal, then they have the same value as the usual (bidirectional) derivative." See here. As for your "exists everywhere and is continuous", that is irrelevant here (although true in this case). – TonyK Aug 29 '21 at 20:10
  • 1
    I see what you mean now, I had misunderstood your argument. – Jair Taylor Aug 30 '21 at 00:55
1

As an alternative, following your first idea, we can use that for $x\neq 0$

$$(|x|)'=\operatorname{sign}(x)$$

then by chain rule and since $x\operatorname{sign}(x)=|x|$

$$f(x)=|x^3|=x^2|x| \implies f'(x)=(|x^3|)'=(x^2|x|)'=2x|x|+x^2\operatorname{sign}(x) =3x|x|=\frac{3x^3}{|x|}$$

and therefore by this theorem

$$\lim_{x\to 0^+}f'(x)=\lim_{x\to 0^-}f'(x) =0 \implies f'(0)=0$$

user
  • 154,566
  • 2
    The function $x\mapsto|x|$ is not differentiable at $0$, and so it seems to me that you can't apply the chain rule to compute the derivative of $x\mapsto|x^3|$ at $0$. – Joe Aug 29 '21 at 17:43
  • 1
    @Joe Yes we need to take the limit, I specify this. Thanks – user Aug 29 '21 at 17:44
  • 2
    Could I suggest that you explain why we know that $f'$ is continuous at $0$? I believe you are using the theorem that if $\lim_{x\to a}f'(x)$ exists, and $f$ is continuous at $a$, then $f'(a)$ exists, and $f'(a)=\lim_{x\to a}f'(x)$. – Joe Aug 29 '21 at 17:52
  • 1
    @Joe Good suggestion, yes we also need to specify that. Thanks again, I add that point. – user Aug 29 '21 at 17:58