3

Usually, for a question involving products, my first approach would be to apply the product rule, giving $\frac{d}{dx}(x^2|x|)=x^2(\frac{d}{dx}|x|)+|x|2x$. Using methods discussed here (Finding the Derivative of |x| using the Limit Definition), I got $\frac{d}{dx}|x|=\frac{x}{|x|}$, so subsituting this in gives $\frac{d}{dx}(x^2|x|)=\frac{x^3}{|x|}+2x|x|$.

However, the derivative of $x^2|x|$ is in fact equal to $3x|x|$. Where have I gone wrong?

I also tried using $\frac{df(x)}{dx}=\lim_{x\to x_0}\frac{f(x)-f(x_0)}{x-x_0}$, which gave $\frac{x^2|x|-x_0^2|x_0|}{x-x_0}\rightarrow\frac{x^2_0|x_0|-x_0^2|x_0|}{x_0-x_0}=0$ as $x\rightarrow x_0$ - I need to get $3x|x|$, so this can't be right!

Any help would be much appreciated.

Harman
  • 171
  • 1
    you have to be careful on where you differentiate. Keep in mind that $\mid x \mid$ is not differentiable at $0$. – J.F Jan 19 '19 at 17:50
  • 1
    None of this is necessary to compute the derivative $f'(x)$ at $x\ne0$ since, then, one can get rid of the absolute value. More annoyingly, none of this applies to the derivative at $x=0$ since you are dividing liberally by $|x|$... How do you suggest to find $f'(0)$? – Did Jan 19 '19 at 18:00

4 Answers4

6

Rather than trying to do something clever, why not just apply the definitions directly? First, we can reasonably assume:

Definition: The absolute value function is the function defined by the formula $$|x| = \begin{cases} x & \text{if $x \ge 0$, and} \\ -x & \text{ if $x < 0$.} \end{cases} $$

(There are other definitions of the absolute value function, but they are all equivalent to this one over $\mathbb{R}$, and this one is likely the easiest to use in the context of the current question.)

The function of interest then becomes $$ f(x) = x^2|x| = \begin{cases} x^2(x) & \text{if $x \ge 0$, and} \\ x^2(-x) & \text{if $x < 0$} \end{cases} = \begin{cases} x^3 & \text{if $x \ge 0$, and} \\ -x^3 & \text{if $x < 0$.} \end{cases} $$ This can be differentiated piecewise using the power rule to get $$ f'(x) = \begin{cases} 3x^2 & \text{if $x > 0$, and} \\ -3x^2 & \text{if $x < 0$.} \end{cases} $$ Note that we can't simply "take the derivative" at zero, since zero is not in the interior of either of the two intervals on which we are differentiating. However, at zero we can directly apply the definition of the derivative: $$ f'(0) = \lim_{h\to 0} \frac{f(x+h) - f(x)}{h}, $$ if this limit exists. Taking the limit from the right, we get $$ \lim_{h\to 0^+} \frac{(0+h)^2|0+h| - 0^2|0|}{h} = \lim_{h\to 0^+} \frac{h^2|h|}{h} = \lim_{h\to 0^+} h|h| = 0. $$ The limit from the left is essentially the same, from which we may conclude that $f'(0) = 0$. Combining these results, we get $$ f'(x) = \begin{cases} 3x^2 & \text{if $x > 0$} \\ 0 & \text{if $x=0$, and} \\ -3x^2 & \text{if $x < 0$.} \end{cases} $$ By again applying the definition of the absolute value function, this can be simplified to $3x|x|$, which is the claimed result.

2

We can write $x^2$ as $|x|^2$ so we have $\dfrac {|x|^2x}{|x|}=x|x|$. Therefore the answer is $x|x|+2x|x|=3x|x|.$

1

Note that$$\frac{x^2}{\lvert x\rvert}=\frac{\lvert x\rvert^2}{\lvert x\rvert}=\lvert x\rvert$$and that therefore $\dfrac{x^3}{\lvert x\rvert}=x\lvert x\rvert$.

0

I would write $f(x) = x^2|x| = |x^3|$. Then if $x>0$, $f(x) =x^3$ and $f'(x)3x^2$. If $x<0$ then $f(x) = -x^3$ and $f'(x) = -3x^2$. In both cases $f'(x) = 3x|x|.$

B. Goddard
  • 33,728