Tutorials › Real Analysis › Derivative Zero Implies Constancy

Differentiation · Tutorial 422 of 1000

Derivative Zero Implies Constancy

Learn how zero derivatives characterize locally constant functions and why equal derivatives determine functions up to an additive constant.

Advanced 9 min read

What You'll Learn

  • Use the Zero Derivative Implies Constancy theorem without repeating its proof
  • Show that functions with equal derivatives differ by a constant
  • Recognize local constancy from a derivative that vanishes everywhere
  • Distinguish a zero derivative at one point from a zero derivative throughout an interval
  • Identify why disconnected domains and endpoint continuity affect constancy

From a Zero Derivative to a Whole Function

A derivative describes local change, but the Zero Derivative Implies Constancy theorem gives a global conclusion: under its interval and continuity hypotheses, if the derivative vanishes throughout, the function has the same value everywhere. This tutorial develops several useful ways to apply that result. In particular, it shows how to compare two functions by comparing their derivatives, and how a vanishing derivative characterizes local constancy.

The interval hypothesis is essential. An interval contains every point between any two of its points, so there is no gap across which a function can change value without having nonzero derivative somewhere. On a disconnected domain, zero derivative can force constancy on each interval component without forcing the values on different components to agree. Endpoint continuity also matters when the derivative condition is imposed only at interior points.

We will use the Zero Derivative Implies Constancy theorem established earlier in this course, together with the difference rule and the definition of the derivative. The purpose here is to draw out what that theorem lets us conclude, and to check carefully where its hypotheses enter.

Equal Derivatives Determine a Function up to a Constant

Suppose two functions have the same derivative throughout an interval. Their rates of change match at every interior point, so their difference has derivative zero. Applying the Zero Derivative Implies Constancy theorem to that difference gives a precise comparison.

Theorem (Equal Derivatives Differ by a Constant): Let \(I\) be a nonempty interval, and let \(f,g:I\to\mathbb{R}\) be continuous on \(I\) and differentiable at every interior point of \(I\). If \(f'(x)=g'(x)\) at every interior point \(x\), then there is a constant \(C\in\mathbb{R}\) such that \(f(x)-g(x)=C\) for every \(x\in I\).

Proof. Define \(h:I\to\mathbb{R}\) by \(h(x)=f(x)-g(x)\). The difference rule shows that \(h\) is differentiable at every interior point of \(I\), and

$$ h'(x)=f'(x)-g'(x)=0. $$

Also, \(h\) is continuous on \(I\), because \(f\) and \(g\) are continuous there. The Zero Derivative Implies Constancy theorem applied to \(h\) now gives a constant \(C\) such that \(h(x)=C\) for all \(x\in I\). By the definition of \(h\), this is exactly \(f(x)-g(x)=C\). \(\square\)

If the functions agree at even one point \(a\in I\), then \(C=f(a)-g(a)=0\). In that case \(f=g\) everywhere on \(I\). Thus one value, together with equality of derivatives, is enough to identify the functions on the whole interval.

Worked Example: Comparing Two Polynomials by Their Derivatives

Let \(f(x)=3x^2-4x+7\) and \(g(x)=3x^2-4x-2\), defined on \(\mathbb{R}\). Their derivatives are

$$ f'(x)=6x-4 \qquad\text{and}\qquad g'(x)=6x-4. $$

The derivatives agree on the interval \(\mathbb{R}\), so the theorem says that \(f-g\) is constant. Direct subtraction verifies the constant:

$$ f(x)-g(x) =(3x^2-4x+7)-(3x^2-4x-2) =9. $$

The constant is also the difference at any chosen point. At \(x=0\), for example, \(f(0)-g(0)=7-(-2)=9\). If instead we had adjusted \(g\) to have the same value as \(f\) at zero, the two functions would agree everywhere.

Worked Example: A Derivative and One Value Determine the Function

Suppose \(f:\mathbb{R}\to\mathbb{R}\) is differentiable, \(f'(x)=4x-1\) for every \(x\), and \(f(2)=5\). Consider \(g(x)=2x^2-x\). The power rule gives \(g'(x)=4x-1\), so \(f'\) and \(g'\) agree everywhere. The Equal Derivatives Differ by a Constant theorem gives \(f-g=C\) for some constant \(C\).

Use the specified value to determine \(C\). Since \(g(2)=2(2)^2-2=8-2=6\),

$$ C=f(2)-g(2)=5-6=-1. $$

Therefore \(f(x)=g(x)-1=2x^2-x-1\) for every real \(x\). Verification gives \(f(2)=8-2-1=5\), and differentiating gives \(f'(x)=4x-1\), as required. No integration is needed for this conclusion: equal derivatives and one matching value suffice.

Zero Derivative and Local Constancy

A function is locally constant if every point has a neighborhood on which the function takes just one value. This is weaker than being constant across an entire domain that might have separate pieces. On an open interval, however, vanishing derivative everywhere is exactly the condition for local constancy.

Theorem (Local Constancy Criterion): Let \(I\) be an open interval, and let \(f:I\to\mathbb{R}\) be differentiable. Then \(f'(x)=0\) for every \(x\in I\) if and only if \(f\) is locally constant on \(I\).

Proof. First suppose \(f'(x)=0\) for every \(x\in I\). Fix \(a\in I\). Since \(I\) is open, there is an open interval \(J\) containing \(a\) with \(J\subseteq I\). The restriction of \(f\) to \(J\) is continuous and has derivative zero throughout \(J\). The Zero Derivative Implies Constancy theorem shows that \(f\) is constant on \(J\). Since this works for every \(a\in I\), \(f\) is locally constant on \(I\).

Conversely, suppose \(f\) is locally constant on \(I\), and fix \(a\in I\). There is a neighborhood of \(a\) on which \(f(x)=f(a)\). For every sufficiently small nonzero \(h\), the point \(a+h\) lies in that neighborhood, so

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

These difference quotients therefore converge to zero as \(h\to0\). Since \(f\) is differentiable at \(a\), its derivative is the limit of those quotients, and \(f'(a)=0\). The point \(a\) was arbitrary, so the derivative vanishes everywhere on \(I\). \(\square\)

Worked Example: A Zero Derivative at One Point Is Not Enough

Define \(q(x)=x^3\) on \(\mathbb{R}\). The power rule gives \(q'(x)=3x^2\), so \(q'(0)=0\). But this does not make \(q\) constant on any neighborhood of zero: for every \(r>0\), the points \(0\) and \(r/2\) both lie in \((-r,r)\), while

$$ q(0)=0 \qquad\text{and}\qquad q(r/2)=(r/2)^3>0. $$

There is no contradiction with the Zero Derivative Implies Constancy theorem or the Local Constancy Criterion. Both require the derivative to vanish throughout an interval, not merely at a single point. A zero derivative at one point records a local first-order feature; it does not establish constancy on any surrounding interval.

Where the Domain and Endpoint Conditions Enter

The conclusion that a function is constant is global across its domain. The derivative condition can only link values when the domain includes the interval between the points being compared. If the domain has separated pieces, apply the theorem on each interval piece where its hypotheses hold, but do not infer that the constants on different pieces are equal.

Worked Example: Zero Derivative on a Disconnected Domain

Let \(E=(-\infty,0)\cup(0,\infty)\), and define \(u:E\to\mathbb{R}\) by

$$ u(x)= \begin{cases} 0,&x<0,\\ 1,&x>0. \end{cases} $$

Every point of \(E\) lies inside one of its two open interval components. On the negative component, \(u\) is constant with value zero; on the positive component, it is constant with value one. Thus \(u'(x)=0\) at every \(x\in E\), but \(u\) is not constant on \(E\), since \(u(-1)=0\) and \(u(1)=1\). The domain is not an interval: it omits the points between \(-1\) and \(1\), including zero. The theorem can be applied separately to each component, but there is no conclusion equating their constants.

There is a separate issue when an interval has included endpoints. In the version used earlier in this course, the function must be continuous on the whole interval and differentiable at its interior points. Continuity at an included endpoint cannot be dropped merely because the derivative condition concerns interior points.

Worked Example: Why Continuity at an Included Endpoint Matters

Define \(v:[0,1]\to\mathbb{R}\) by \(v(0)=1\) and \(v(x)=0\) for \(0<x\leq1\). At each interior point \(x\in(0,1)\), the function is constant in a neighborhood of \(x\), so \(v'(x)=0\). Nevertheless, \(v\) is not constant on \([0,1]\), because \(v(0)=1\) while \(v(1/2)=0\). The missing hypothesis is continuity on the whole interval: \(v\) is not continuous at zero.

If continuity on \([0,1]\) were added, the Zero Derivative Implies Constancy theorem would apply and rule out this behavior. In particular, an endpoint value cannot differ from the interior constant while the function remains continuous there.

Using the Result Carefully

When a problem asks whether a function must be constant, first identify the domain and the extent of the derivative condition. A derivative that vanishes at one point is not enough. A derivative that vanishes everywhere on an interval gives constancy under the theorem’s continuity and differentiability assumptions. On a disconnected domain, the same reasoning gives constancy on each interval component, not necessarily a single shared value over the entire domain.

For comparing two functions, the efficient technique is to subtract them. If their derivatives agree, the difference has derivative zero; the theorem then says the difference is a constant. If the functions also agree at one point, that constant must be zero, so the functions agree throughout the interval. This is often useful when a function is described by a derivative condition and one known value.

Finally, local constancy and constancy should not be confused on an arbitrary domain. The Local Constancy Criterion is stated on an open interval, where its zero-derivative direction follows by applying the earlier theorem in a small interval around each point. A function can be locally constant on each of several separated pieces and still take different values on different pieces.

Check Your Understanding

Use the zero-derivative result and its consequences to answer the following.

  1. If \(f'\) and \(g'\) agree throughout an interval and \(f(a)=g(a)\) at one point, what can you conclude about \(f\) and \(g\) on the interval?
  2. Why does \(q(x)=x^3\), despite \(q'(0)=0\), not contradict the Local Constancy Criterion?
  3. What conclusion follows if a derivative vanishes everywhere on each of two separated interval components?
  4. In the endpoint example, which hypothesis needed for constancy fails?
  5. Explain why subtracting two functions with equal derivatives is useful.