This might be a naive question, but it sometimes confuses me.
It's known that the derivative of $|x|=\frac{x}{|x|}$. Is it conventional that the absolute value appears in the denominator and not $\frac{|x|}{x}$ ?
Conventional to write the derivative of $|x|$ wrt $x$ as $\frac{x}{|x|}$?
175 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 4 best solutions below
On
Writing "the derivative of $|x| = x/|x|$" does not make sense, this is an equation (whose unique solution is $x=1$), and not a function. If you mean $f\colon \Bbb R \setminus \{0\}\to \Bbb R$ given by $f(x) = x/|x|$, then $f$ is differentiable and $f'(x) = 0$ for all $x$ in $\Bbb R\setminus \{0\}$. On the interval $(0,+\infty)$ $f$ is constant equal to $1$ and on $(-\infty,0)$ $f$ is constant equal to $-1$. This is also a standard example of a non-constant function with zero derivative (because the domain $\Bbb R\setminus \{0\}$ is disconnected).
It does not make sense to ask whether $f$ is continuous or differentiable at $0$ because $0$ is not in the domain of $f$.
Asking whether $f$ has a continuous extension to the full line $\Bbb R$ does make sense, and the answer is "no" because $\lim_{x\to 0^-}f(x) \neq \lim_{x\to 0^+}f(x)$.
Also, we have that $$\frac{x}{|x|} = \frac{|x|}{x}$$for all $x \in \Bbb R \setminus \{0\}$ because both have the same absolute value (namely, $1$) and the same sign.
On
As @J. W. Tanner has pointed out in the comments - in fact ${|x|}$ is not differentiable at ${x=0}$. Otherwise, simply take the piecewise definition for ${|x|}$:
$${|x|=\left\{\begin{array}{cc}x:&x\geq0\\-x:&x<0\end{array}\right.}$$
The derivative will hence also be piecewise. Then
$${\frac{d}{dx}(|x|)=\left\{\begin{array}{cc}1:&x>0\\-1:&x<0\\\text{undefined}:&x=0\end{array}\right.}$$
It's derivative is undefined at ${x=0}$ because it depends on which direction you approach from; if you take the limit from the right side, the derivative is $1$, from the left side it is ${-1}$. So it's not well-defined.
Now,
$${\frac{|x|}{x}=\frac{x}{|x|}=\left\{\begin{array}{cc}1:&x>0\\-1:&x<0\\\text{undefined}:&x=0\end{array}\right.}$$
So yes, you could technically write the derivative either of these ways. But just remember it's simply a portable way of carrying around the fact we are dealing with a piecewise function!
On
If $x > 0$ then $|x| = x$ and $\frac {x}{|x|}=\frac xx = \frac {|x|}{x} = 1$.
ANd if $x < 0$ then $|x| = -x$ and $x = -|x|$ and $\frac {x}{|x|}=\frac {x}{-x} = -\frac {x}{x} = \frac {-x}{x}= \frac {|x|}{x}=-1$.
So it doesn't matter. The are both the same function. $f(x) = \begin{cases}1&x>0\\-1&x< 0\\undefined& x=0\end{cases}$
I guess the question is why is $\frac {x}{|x|}$ the convention. Although I have my guesses I honestly have no idea. Some conventions.... just happen.
Yes, it is simply by convention. I think it comes from the definition $$|x|=\sqrt{x^2}.$$
Rewriting and differentiating using the chain rule, we have the following:
\begin{align} \frac{d}{dx}\left(|x|\right)&=\frac{d}{dx}\left(\sqrt{x^2}\right)\\ &=\frac{2x}{2\sqrt{x^2}}\\ &=\frac{x}{\sqrt{x^2}}\\ &=\frac{x}{|x|}. \end{align}