Consider the derivative of the absolute value function,
\begin{equation*}
f(x) = \abs{x} = \begin{cases} x \amp x \geq 0 \\ -x \amp x \lt 0 \end{cases}
\end{equation*}
Graph of \(f(x) = \abs{x}\). It is a line with slope 1 for
\(x\gt 0\text{,}\) a line with slope
\(-1\) for
\(x \lt 0\text{,}\) and there is a “sharp corner” at
\(x = 0\text{.}\) Therefore, we expect that its derivative will be 1 for
\(x \gt 0\text{,}\) \(-1\) for
\(x \lt 0\text{.}\) Indeed,
-
For
\(x \gt 0\text{,}\) \(f'(x) = \frac{d}{dx} x = 1\)
-
For
\(x \lt 0\text{,}\) \(f'(x) = \frac{d}{dx} (-x) = -1\)
However, at
\(x = 0\) (the sharp corner), we have to use the limit definition of derivative, because the function is given by two different formulas on either side of
\(x = 0\text{.}\)
First, intuitively, the derivative represents the slope of the graph. However, at
\(x=0\text{,}\) the function has two different slopes on each side of
\(x=0\text{.}\) Therefore, we expect that the derivative does not exist at
\(x=0\text{.}\) We can confirm this using the limit definition of derivative,
\begin{align*}
f'(0) \amp= \lim_{h \to 0} \frac{\abs{0 + h} - \abs{0}}{h}\\
\amp= \lim_{h \to 0} \frac{\abs{h}}{h} \amp\amp \text{simplifying}
\end{align*}
You might recognize this limit from one we have seen before:
Limit with Absolute Value, which does not exist. To see this, we can evaluate the limit from the right and from the left,
-
From the right, as \(h \to 0+\text{,}\) \(\abs{h} = h\text{,}\) and so,
\begin{equation*}
\lim_{h \to 0+} \frac{\abs{h}}{h} = \lim_{h \to 0+} \frac{h}{h} = \lim_{h \to 0+} 1 = 1
\end{equation*}
Thus, from the right, the slopes approach 1 (this can be confirmed graphically).
-
However, from the left, as \(h \to 0-\text{,}\) \(\abs{h} = -h\text{,}\) and so,
\begin{equation*}
\lim_{h \to 0-} \frac{\abs{h}}{h} = \lim_{h \to 0-} \frac{-h}{h} = \lim_{h \to 0-} -1 = -1
\end{equation*}
From the left, the slopes approach \(-1\text{.}\)
Since these one sided limits are not equal,
\(\lim_{h \to 0} \frac{\abs{h}}{h}\) does not exist, and so the derivative does not exist. In summary,
\begin{equation*}
\boxed{\frac{d}{dx} \abs{x} = \begin{cases} 1 \amp x \gt 0 \\ -1 \amp x \lt 0 \end{cases}}
\end{equation*}
Note: The derivative of the absolute value function can be summarized concisely with a single formula, using the expression
\(\frac{\abs{x}}{x}\text{,}\)
\begin{equation*}
\frac{d}{dx} \abs{x} = \frac{\abs{x}}{x} \qquad x \neq 0
\end{equation*}