The Absolute-Value Function and Its Difference Quotient
The Chain Rule gives the derivative of a composition when the outer function is differentiable at the value reached by the inner function. Absolute value makes this condition important: the function \(A(x)=|x|\) behaves linearly on either side of zero, but its behavior changes at zero. We will compute its derivative directly from the definition, then use the Chain Rule and a first-order approximation to examine compositions such as \(|u(x)|\).
Recall that the derivative at an interior point \(a\) is the limit of the difference quotient, provided that limit exists:
The formula \(|x|=x\) for \(x\geq0\) and \(|x|=-x\) for \(x<0\) suggests two different local behaviors. At a nonzero point, sufficiently small changes do not cross zero, so just one of these formulas applies. At zero, positive and negative increments give incompatible difference quotients.
Proof Away from Zero
Proof. First suppose \(a>0\). Choose \(h\) with \(0<|h|<a\). Then \(a+h\geq a-|h|>0\), so both \(a+h\) and \(a\) are positive. Therefore
The difference quotient is exactly \(1\) for every sufficiently small nonzero \(h\). Its limit as \(h\to0\) is therefore \(1\), so \(A'(a)=1\).
Now suppose \(a<0\). Choose \(h\) with \(0<|h|<-a\). Since \(a+|h|<0\), we have \(a+h\leq a+|h|<0\); also \(a<0\). Thus
Again, the difference quotient is constant for all sufficiently small nonzero \(h\), so its limit is \(-1\). This proves the derivative formula at every nonzero \(a\).
Why the Derivative Fails at Zero
At \(a=0\), the difference quotient for \(h\ne0\) is
For every \(h>0\), this quotient equals \(1\). For every \(h<0\), it equals \(-1\). To verify that there is no limit as \(h\to0\), take the sequences \(h_n=1/n\) and \(k_n=-1/n\), for positive integers \(n\). Both sequences consist of nonzero increments and tend to zero, but
for every \(n\). If the difference quotient had a limit, its values along both sequences would tend to that same limit. Since the two constant sequences of quotient values have different limits, the derivative at zero does not exist. \(\square\)
Worked Example: The Derivative at a Positive Point
Compute the derivative of \(A(x)=|x|\) at \(a=5\) from the definition. For \(0<|h|<5\), we have \(5+h>0\), and hence \(|5+h|=5+h\) and \(|5|=5\). The difference quotient is
Because this equality holds for every nonzero \(h\) with \(|h|<5\), the limit is \(1\). Thus \(A'(5)=1\). The calculation illustrates why it is useful to choose a neighborhood that stays on one side of zero.
Worked Example: The Derivative at a Negative Point
At \(a=-3\), take \(h\) with \(0<|h|<3\). Then \(-3+h<0\), so \(|-3+h|=-(-3+h)=3-h\), while \(|-3|=3\). Consequently,
The quotient is \(-1\) throughout this punctured neighborhood, and therefore \(A'(-3)=-1\). Notice that the derivative is the slope of the local linear formula \(-x\), not the value of the function at \(-3\).
Worked Example: Testing the Derivative at the Corner
At zero, use \(h_n=1/n\) and \(k_n=-1/n\). Substitution into the difference quotient gives
Both increment sequences approach zero, while the corresponding quotient values remain different. Hence the difference quotient cannot have a limit, and \(A'(0)\) does not exist. This is a direct application of the Sequential Criterion for the Derivative Limit from earlier in this course.
Absolute Values of Differentiable Functions
The result for \(A(x)=|x|\) gives a useful rule for compositions. If a differentiable function \(u\) satisfies \(u(a)\ne0\), then the value \(u(x)\) remains on the same side of zero for \(x\) sufficiently close to \(a\). In that neighborhood, the absolute value either leaves \(u\) unchanged or changes its sign. The Chain Rule also applies directly, since \(A\) is differentiable at \(u(a)\).
Proof. Define \(A(y)=|y|\). The function \(x\mapsto |u(x)|\) is \(A\circ u\). Because \(u(a)\ne0\), the theorem on the derivative of the absolute-value function shows that \(A\) is differentiable at \(u(a)\). The Chain Rule therefore gives
If \(u(a)>0\), then \(A'(u(a))=1\), giving \((A\circ u)'(a)=u'(a)\). If \(u(a)<0\), then \(A'(u(a))=-1\), giving \((A\circ u)'(a)=-u'(a)\). These are all the cases allowed by \(u(a)\ne0\), proving the formula. \(\square\)
At a point where \(u(a)=0\), the Chain Rule cannot be applied with \(A\) as the outer function, because \(A\) is not differentiable at \(0\). The composite may or may not be differentiable. Its behavior depends on the first-order change of \(u\) at \(a\).
Proof. Since \(u\) is differentiable at \(a\), the First-Order Approximation Characterization gives a remainder \(r(h)\) such that, for sufficiently small \(h\) with \(a+h\in I\),
First suppose \(u'(a)=0\). Then \(u(a+h)=r(h)\), and \(|u(a)|=0\). For every nonzero sufficiently small \(h\),
Thus the difference quotient for \(|u|\) tends to zero, so the composite is differentiable at \(a\) with derivative \(0\).
Now suppose \(u'(a)=c\ne0\). The first-order approximation implies
For positive increments \(h\), we have
For negative increments \(h\), division by \(h\) reverses the sign relative to division by \(|h|\), so
Because \(c\ne0\), the numbers \(|c|\) and \(-|c|\) are distinct. The difference quotient therefore cannot have a single limit as \(h\to0\). So \(|u|\) is not differentiable at \(a\). \(\square\)
Worked Example: A Genuine Corner in an Absolute-Value Composition
Consider \(F(x)=|x^2-9|\) at \(a=3\). Let \(u(x)=x^2-9\). Then \(u(3)=9-9=0\), and the Power Rule gives \(u'(x)=2x\), so \(u'(3)=6\ne0\). By the theorem for a zero of the inner function, \(F\) is not differentiable at \(3\).
The difference quotient also displays the conflict explicitly. Since \(u(3+h)=6h+h^2=h(6+h)\), for sufficiently small positive \(h\) we have \(6+h>0\), and
For sufficiently small negative \(h\), \(6+h>0\) still holds, but \(|h|=-h\). Hence
The two limits differ, confirming nondifferentiability.
Worked Example: A Zero Where the Absolute Value Is Differentiable
Consider \(G(x)=|(x-2)^2|\) at \(a=2\). Set \(u(x)=(x-2)^2\). Then \(u(2)=0\), and the Power Rule gives \(u'(x)=2(x-2)\), so \(u'(2)=0\). The theorem shows that \(G\) is differentiable at \(2\) with derivative \(0\).
In fact, \((x-2)^2\geq0\) for all \(x\), so \(G(x)=(x-2)^2\). Directly, for \(h\ne0\),
The inner function reaches zero without a nonzero first-order change, so taking absolute value does not create a corner at this point.
What to Check Before Applying the Chain Rule
The absolute-value function is continuous everywhere, but continuity alone does not ensure differentiability: its difference quotient fails to converge at zero. The Chain Rule requires differentiability of the outer function at the inner value, so it directly handles \(|u(x)|\) when \(u(a)\ne0\), but not when \(u(a)=0\). At a zero, inspect \(u'(a)\): if it is zero, the composite has derivative zero; if it is nonzero, the two directions give incompatible limits.
This distinction prevents two common errors. First, the formula \(A'(x)=1\) is valid only for \(x>0\), and the formula \(A'(x)=-1\) only for \(x<0\); neither supplies a derivative at zero. Second, the failure of the outer function to be differentiable at zero does not automatically imply failure of the composite. The inner function can approach that value with zero first-order change, as the last example demonstrates.
Check Your Understanding
Use the derivative definition and the results above to answer the following.
- Why can the difference quotient for \(A(x)=|x|\) be simplified to \(1\) near a positive point \(a\)?
- What two sequences of increments show that \(A\) is not differentiable at zero?
- If \(u(a)<0\) and \(u\) is differentiable at \(a\), what is the derivative of \(|u(x)|\) at \(a\)?
- Suppose \(u(a)=0\) and \(u'(a)=0\). What is the derivative of \(|u(x)|\) at \(a\), and what estimate proves it?
- For \(H(x)=|x^2-4|\), determine whether \(H\) is differentiable at \(a=2\), using the inner derivative.