Why Zeros Need Special Attention
Taking the absolute value of a function can change how its graph behaves near a zero. If the original function crosses the horizontal axis with a nonzero slope, its absolute value may turn that crossing into a corner. But a zero by itself does not guarantee a corner: if the function approaches zero sufficiently flatly, its absolute value can still be differentiable.
To decide what happens, examine the difference quotient at the zero. The key information is the derivative of the original function there, together with the signs of nearby function values. This approach uses the definition of derivative directly; it does not assume a chain rule.
The Difference Quotient at a Zero
Let \(g\) be defined on an open interval containing \(a\), and suppose \(g(a)=0\). Define \(f(x)=|g(x)|\). Since \(f(a)=|g(a)|=0\), the difference quotient for \(f\) at \(a\), for \(h\ne 0\), is
The numerator is nonnegative, but the denominator changes sign. Therefore, the left-hand and right-hand difference quotients need not agree. Their behavior is controlled by how quickly \(g(a+h)\) approaches zero and by its sign on each side.
For the absolute value function \(f(x)=|g(x)|\) at a zero \(a\), those quotients are obtained by taking the limits of \(\frac{|g(a+h)|}{h}\) from each side. First, consider what the derivative \(g'(a)\) tells us about them.
A Criterion at a Zero
The theorem is useful because it reduces a question about the absolute value to the derivative of the original function at the zero. We will prove both directions using the difference quotient.
Because \(g(a)=0\), the quotient for \(f\) is \(\frac{|g(a+h)|}{h}\) for \(h\ne0\).
Differentiability gives \(\frac{g(a+h)}{h}\to g'(a)\) as \(h\to0\).
When \(g'(a)\ne0\), the absolute-value quotients approach opposite values from the left and right. When \(g'(a)=0\), both approach zero.
Here is the full argument. Put \(c=g'(a)\). Since \(g(a)=0\), the definition of \(g'(a)\) gives
For \(h>0\), the quotient for \(f\) can be written as
For \(h<0\), changing the sign of the denominator gives
The absolute value function is continuous, so the right-hand quotient tends to \(|c|\), and the left-hand quotient tends to \(-|c|\). If \(c\ne0\), these limits differ, so the two-sided derivative of \(f\) does not exist. If \(c=0\), both one-sided quotients tend to zero, so the two-sided limit exists and equals zero. This proves the theorem.
This argument also explains the local sign behavior when \(c\ne0\). For sufficiently small nonzero \(h\), the quotient \(g(a+h)/h\) has the same sign as \(c\). Thus \(g(a+h)\) has opposite signs on the two sides of \(a\). Taking the absolute value reflects the part below zero upward, producing unequal one-sided slopes.
Worked Examples
Worked Example: A Nonzero Slope Produces a Corner
Determine whether \(f(x)=|3x-6|\) is differentiable at \(a=2\). Set \(g(x)=3x-6\). Then \(g(2)=3(2)-6=0\), and \(g'(2)=3\). The criterion predicts that \(f\) is not differentiable at \(2\). Check the one-sided quotients directly.
Since \(f(2)=0\), for \(h\ne0\),
If \(h>0\), then \(|3h|=3h\), so the quotient is \(3h/h=3\). The right-hand derivative is \(3\). If \(h<0\), then \(|3h|=-3h\), so the quotient is \((-3h)/h=-3\). The left-hand derivative is \(-3\). Since \(3\ne-3\), the derivative does not exist. The different one-sided slopes confirm the predicted corner.
Worked Example: A Zero with Zero Slope
Determine the derivative of \(f(x)=|(x-1)^2|\) at \(a=1\). Here \(g(x)=(x-1)^2\), so \(g(1)=0\). The difference quotient for \(g\) at \(1\) is
As \(h\to0\), this tends to zero, so \(g'(1)=0\). For the absolute value, the quotient is
because \(h^2\ge0\). This quotient tends to zero from both sides, so \(f'(1)=0\). As a check, \(|(x-1)^2|=(x-1)^2\) for every \(x\), and the difference quotient just computed confirms the derivative at \(1\).
Worked Example: A Sign Change Does Not Always Prevent Differentiability
Consider \(f(x)=|(x-1)^3|\) at \(a=1\). Let \(g(x)=(x-1)^3\), for which \(g(1)=0\). Its difference quotient at \(1\) is
This tends to zero, so \(g'(1)=0\). For \(f\), the quotient is
When \(h>0\), this equals \(h^3/h=h^2\). When \(h<0\), \(|h^3|=-h^3\), so the quotient equals \(-h^3/h=-h^2\). Both \(h^2\) and \(-h^2\) tend to zero as \(h\to0\) on their respective sides. Therefore \(f'(1)=0\).
The original function changes sign across \(1\), but the change happens with zero slope. The absolute value is therefore differentiable there. Substitution back into the defining quotient verifies the result: its limit from each side is zero.
Local Sign Information and Its Limits
A stable sign on both sides is one way to understand why an absolute value may not create a corner: if \(g\) is nonnegative nearby, then \(|g|=g\) there; if \(g\) is nonpositive nearby, then \(|g|=-g\) there. However, the theorem gives a more general test at a zero. It applies even if the sign changes or keeps oscillating, provided \(g\) is differentiable at the zero.
When \(g'(a)\ne0\), the nonzero first-order change forces a sign change across \(a\), and the absolute-value difference quotients have unequal limits. When \(g'(a)=0\), the quotient \(\frac{g(a+h)}{h}\) tends to zero. Its absolute value also tends to zero, so neither side can retain a nonzero slope. This reasoning depends on differentiability of \(g\) at \(a\); without that assumption, the criterion cannot be applied as stated.
Common Mistake: Assigning a Slope at the Zero
A tempting but incorrect shortcut is to treat the derivative of an absolute value as though it could be evaluated at the zero by simply taking the absolute value of the original derivative. For \(f(x)=|x|\) at \(0\), this would give the incorrect conclusion \(f'(0)=|1|=1\).
The definition shows the problem. Since \(f(0)=0\), its quotient is \(\frac{|h|}{h}\). For \(h>0\), this equals \(1\); for \(h<0\), it equals \(-1\). The one-sided limits disagree, so \(f'(0)\) does not exist. The correction is to test both sides of the defining quotient, rather than assign a value to a formula at the zero.
Why the Criterion Matters
The criterion separates two situations that can look similar if we focus only on the fact that \(g(a)=0\). A zero with nonzero derivative creates unequal one-sided slopes after taking absolute values. A zero with zero derivative yields derivative zero for the absolute value, even when \(g\) changes sign. The decisive quantity is the rate of change at the zero, not the zero alone.
When analyzing a particular function, a reliable order of work is:
- Identify a point \(a\) where \(g(a)=0\).
- Check that \(g\) is differentiable at \(a\).
- Find \(g'(a)\), using the definition if needed.
- If \(g'(a)\ne0\), compare the one-sided quotients; they are \(|g'(a)|\) and \(-|g'(a)|\), so \(|g|\) is not differentiable there.
- If \(g'(a)=0\), the quotient for \(|g|\) tends to zero from both sides, so \(|g|'(a)=0\).
Check Your Understanding
Use the difference quotient at the zero in each question. State any required assumption about differentiability.
- If \(g(a)=0\), \(g\) is differentiable at \(a\), and \(g'(a)=5\), what are the right-hand and left-hand difference-quotient limits for \(|g|\) at \(a\)?
- For \(f(x)=|(x+2)^2|\), determine whether \(f\) is differentiable at \(-2\), and find its derivative there.
- For \(f(x)=|(x-3)^3|\), does the sign change of the expression inside the absolute value prevent differentiability at \(3\)? Justify your answer with the quotient.
- Why is it not valid to conclude that \(|g|\) is nondifferentiable at every zero where \(g\) changes sign?
- What goes wrong in the claim that the derivative of \(|x|\) at \(0\) is \(1\)?