Tutorials › Calculus I › Absolute Values of Functions at Their Zeros

The Derivative from First Principles · Tutorial 368 of 1495

Absolute Values of Functions at Their Zeros

Use local sign information and first-principles difference quotients to decide whether the absolute value of a function is differentiable at one of its zeros.

Intermediate 10 min read

What You'll Learn

  • Set up the difference quotient for the absolute value of a function at a zero
  • Relate the one-sided quotients to the derivative of the original function
  • Prove the differentiability criterion at a zero
  • Distinguish a sign change with nonzero slope from one with zero slope
  • Avoid assigning a derivative to an absolute value merely by evaluating a formula at the zero

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

$$ \frac{f(a+h)-f(a)}{h} = \frac{|g(a+h)|}{h}. $$

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.

Definition: The derivative of \(f\) at an interior point \(a\) exists if the two-sided limit \(\lim_{h\to 0}\frac{f(a+h)-f(a)}{h}\) exists as a finite real number. The right-hand and left-hand difference quotients are the corresponding limits as \(h\to0^+\) and \(h\to0^-\).

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

Theorem: Suppose \(g\) is differentiable at an interior point \(a\) and \(g(a)=0\). Then \(f(x)=|g(x)|\) is differentiable at \(a\) if and only if \(g'(a)=0\). If it is differentiable, then \(f'(a)=0\).

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.

1
Write the quotient.
Because \(g(a)=0\), the quotient for \(f\) is \(\frac{|g(a+h)|}{h}\) for \(h\ne0\).
2
Use the derivative of \(g\).
Differentiability gives \(\frac{g(a+h)}{h}\to g'(a)\) as \(h\to0\).
3
Compare the two sides.
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

$$ \lim_{h\to0}\frac{g(a+h)}{h}=c. $$

For \(h>0\), the quotient for \(f\) can be written as

$$ \frac{|g(a+h)|}{h} = \left|\frac{g(a+h)}{h}\right|. $$

For \(h<0\), changing the sign of the denominator gives

$$ \frac{|g(a+h)|}{h} = -\left|\frac{g(a+h)}{h}\right|. $$

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\),

$$ \frac{f(2+h)-f(2)}{h} = \frac{|3(2+h)-6|}{h} = \frac{|3h|}{h}. $$

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

$$ \frac{g(1+h)-g(1)}{h} = \frac{h^2-0}{h} = h. $$

As \(h\to0\), this tends to zero, so \(g'(1)=0\). For the absolute value, the quotient is

$$ \frac{f(1+h)-f(1)}{h} = \frac{|h^2|}{h} = \frac{h^2}{h} = h \qquad (h\ne0), $$

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

$$ \frac{g(1+h)-g(1)}{h} = \frac{h^3}{h} = h^2 \qquad (h\ne0). $$

This tends to zero, so \(g'(1)=0\). For \(f\), the quotient is

$$ \frac{f(1+h)-f(1)}{h} = \frac{|h^3|}{h}. $$

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.

Key takeaway: If \(g(a)=0\) and \(g\) is differentiable at \(a\), then \(|g|\) is differentiable at \(a\) exactly when \(g'(a)=0\). In that case the derivative of \(|g|\) is zero.

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:

  1. Identify a point \(a\) where \(g(a)=0\).
  2. Check that \(g\) is differentiable at \(a\).
  3. Find \(g'(a)\), using the definition if needed.
  4. If \(g'(a)\ne0\), compare the one-sided quotients; they are \(|g'(a)|\) and \(-|g'(a)|\), so \(|g|\) is not differentiable there.
  5. 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.

  1. 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\)?
  2. For \(f(x)=|(x+2)^2|\), determine whether \(f\) is differentiable at \(-2\), and find its derivative there.
  3. 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.
  4. Why is it not valid to conclude that \(|g|\) is nondifferentiable at every zero where \(g\) changes sign?
  5. What goes wrong in the claim that the derivative of \(|x|\) at \(0\) is \(1\)?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon