How To Find Derivative Of Absolute Value

7 min read

The derivative of an absolute value function is a cornerstone concept in calculus that often trips up students because it introduces a critical nuance: differentiability is not guaranteed everywhere. Unlike polynomials or standard trigonometric functions, the absolute value function $f(x) = |x|$ possesses a sharp corner at the origin. This geometric feature dictates that while the function is continuous everywhere, it fails to be differentiable at exactly one point. Mastering this topic requires understanding the piecewise definition, applying the limit definition of the derivative, and recognizing how the chain rule extends these principles to complex composite functions.

Understanding the Absolute Value Function

Before differentiating, we must rigorously define what the absolute value represents. The absolute value of a real number $x$, denoted $|x|$, represents its distance from zero on the number line. Algebraically, this is defined as a piecewise function:

$ |x| = \begin{cases} x & \text{if } x \geq 0 \ -x & \text{if } x < 0 \end{cases} $

This piecewise definition is the key to unlocking the derivative. It splits the domain into two distinct regions where the function behaves like simple linear functions: $y = x$ for non-negative inputs and $y = -x$ for negative inputs. The "corner" occurs precisely at the boundary $x = 0$, where the slope abruptly changes from $-1$ to $+1$.

No fluff here — just what actually works Not complicated — just consistent..

Derivative Using the Limit Definition

The most fundamental way to find the derivative of $|x|$ is using the limit definition:

$f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}$

We must evaluate this limit for three distinct cases: $x > 0$, $x < 0$, and $x = 0$.

Case 1: $x > 0$

If $x$ is strictly positive, then for sufficiently small $h$, $x+h$ is also positive. Thus $f(x) = x$ and $f(x+h) = x+h$. $f'(x) = \lim_{h \to 0} \frac{(x+h) - x}{h} = \lim_{h \to 0} \frac{h}{h} = 1$

Case 2: $x < 0$

If $x$ is strictly negative, then for sufficiently small $h$, $x+h$ remains negative. Thus $f(x) = -x$ and $f(x+h) = -(x+h)$. $f'(x) = \lim_{h \to 0} \frac{-(x+h) - (-x)}{h} = \lim_{h \to 0} \frac{-x - h + x}{h} = \lim_{h \to 0} \frac{-h}{h} = -1$

Case 3: $x = 0$ (The Critical Point)

Here, we must check the left-hand limit ($h \to 0^-$) and the right-hand limit ($h \to 0^+$) separately.

  • Right-hand derivative ($h \to 0^+$): $h$ is positive, so $|h| = h$. $\lim_{h \to 0^+} \frac{|h| - 0}{h} = \lim_{h \to 0^+} \frac{h}{h} = 1$

  • Left-hand derivative ($h \to 0^-$): $h$ is negative, so $|h| = -h$. $\lim_{h \to 0^-} \frac{|h| - 0}{h} = \lim_{h \to 0^-} \frac{-h}{h} = -1$

Since the left-hand limit ($-1$) does not equal the right-hand limit ($1$), the limit does not exist at $x = 0$. Because of this, the derivative of $|x|$ is undefined at the origin Took long enough..

The General Formula: $\frac{x}{|x|}$ and $\text{sgn}(x)$

Combining the results from the limit definition, we can write the derivative of $|x|$ as a piecewise function:

$ \frac{d}{dx}|x| = \begin{cases} 1 & \text{if } x > 0 \ -1 & \text{if } x < 0 \ \text{Undefined} & \text{if } x = 0 \end{cases} $

This piecewise result is often condensed into a single algebraic expression: $\frac{x}{|x|}$. Which means * If $x > 0$, $\frac{x}{x} = 1$. * If $x < 0$, $\frac{x}{-x} = -1$.

  • If $x = 0$, the expression is undefined (division by zero).

In advanced mathematics and engineering, this derivative is frequently represented by the signum function (sign function), denoted $\text{sgn}(x)$ or $\text{sign}(x)$:

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

Note: While $\text{sgn}(0)$ is often defined as 0 in some contexts, the derivative $\frac{d}{dx}|x|$ remains strictly undefined at $x=0$. Do not confuse the value of the signum function at zero with the existence of the derivative.

Differentiating Composite Absolute Value Functions: The Chain Rule

In practical calculus problems, you will rarely differentiate just $|x|$. You will encounter functions like $|u(x)|$, where $u(x)$ is a differentiable function of $x$. This requires the Chain Rule.

If $y = |u|$, where $u = u(x)$, then: $\frac{dy}{dx} = \frac{d}{du}|u| \cdot \frac{du}{dx} = \frac{u}{|u|} \cdot \frac{du}{dx} \quad (\text{provided } u \neq 0)$

This formula is powerful. It tells us that the derivative is the derivative of the inner function, multiplied by the sign of the inner function.

Example 1: $f(x) = |x^2 - 4|$

Let $u = x^2 - 4$. Then $u' = 2x$. $f'(x) = \frac{x^2 - 4}{|x^2 - 4|} \cdot 2x = \frac{2x(x^2 - 4)}{|x^2 - 4|}$

Critical Analysis: The derivative is undefined where the inner function is zero: $x^2 - 4 = 0 \implies x = \pm 2$. At these points, the graph has sharp corners (cusps) Practical, not theoretical..

Example 2: $f(x) = |\sin(x)|$

Let $u = \sin(x)$. Then $u' = \cos(x)$. $f'(x) = \frac{\sin(x)}{|\sin(x)|} \cdot \cos(x) = \text{sgn}(\sin(x)) \cdot \cos(x)$

This derivative is undefined whenever $\sin(x) = 0$ (i.This leads to e. , at integer multiples of $\pi: x = n\pi$). Between these points, the derivative is simply $\pm \cos(x)$ depending on the sign of the sine wave.

Alternative Method: Rewriting as a Square Root

A clever algebraic manipulation allows us to differentiate absolute value functions without explicitly memorizing the $\frac{x}{|x|}$ formula. Recall the identity:

$|x| = \sqrt{x^2}$

This holds for all real $x$ because the principal square root yields the non-negative value. We can now differentiate using the chain rule on the square root and the power function:

Let $f(x) = \sqrt{x^2} = (x^2)^{1/2}$. $f'(x) = \frac{1}{2}(x

^2)^{-1/2} \cdot 2x = \frac{x}{\sqrt{x^2}} = \frac{x}{|x|} $

This confirms our previous result elegantly. This method is particularly useful when differentiating more complex expressions like $|u(x)|$, as it avoids piecewise definitions during the differentiation step:

$\frac{d}{dx}|u(x)| = \frac{d}{dx}\sqrt{u(x)^2} = \frac{1}{2\sqrt{u(x)^2}} \cdot 2u(x) \cdot u'(x) = \frac{u(x)}{|u(x)|} u'(x)$

Higher-Order Derivatives and the Dirac Delta Function

Since the first derivative of $|x|$ is $\text{sgn}(x)$ (undefined at $x=0$), the second derivative in the classical sense does not exist at the origin. That said, in the theory of distributions (generalized functions), we can define the second derivative The details matter here..

The signum function has a jump discontinuity of magnitude $2$ at $x=0$ (jumping from $-1$ to $+1$). In distribution theory, the derivative of a jump discontinuity is a Dirac delta function $\delta(x)$ scaled by the jump height.

$ \frac{d^2}{dx^2}|x| = \frac{d}{dx}\text{sgn}(x) = 2\delta(x) $

This result is fundamental in physics and engineering, particularly in quantum mechanics (where $|x|$ appears in potential wells) and signal processing (where the absolute value function models full-wave rectification). It implies that the "curvature" of $|x|$ is zero everywhere except at the origin, where it is infinite in a way that integrates to $2$ Simple as that..

Summary of Key Rules

Function Form Derivative (where defined) Points of Non-Differentiability
$ x $
$ u(x) $
$\sqrt{u(x)^2}$ $\frac{u(x) u'(x)}{\sqrt{u(x)^2}}$ Solutions to $u(x) = 0$

Conclusion

The derivative of the absolute value function serves as a gateway to understanding non-smooth analysis. While the elementary calculus approach relies on piecewise definitions and the chain rule—yielding the compact algebraic form $\frac{x}{|x|}$ or the signum function $\text{sgn}(x)$—the square root identity $|x| = \sqrt{x^2}$ provides a unified algebraic pathway for differentiation Worth knowing..

Not obvious, but once you see it — you'll see it everywhere.

Mastering these techniques allows you to work through functions with "corners" and "cusps" confidently. Just remember the cardinal rule: **the derivative exists only where the argument inside the absolute value is non-zero.So whether you are optimizing a loss function in machine learning (like the L1 norm), analyzing the trajectory of a particle reflecting off a wall, or solving differential equations with discontinuous forcing terms, the ability to differentiate $|u(x)|$ is an indispensable tool. ** At the zeros of the inner function, the graph turns sharply, and the classical derivative vanishes into undefined territory—unless, of course, you step into the broader world of distributions Not complicated — just consistent. That's the whole idea..

Latest Batch

Fresh from the Writer

Kept Reading These

Before You Head Out

Thank you for reading about How To Find Derivative Of Absolute Value. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home