Tutorials › AP Calculus › The Derivative of a Constant Function

Power, Polynomial, and Rational Rules · Tutorial 121 of 999

The Derivative of a Constant Function

Learn to derive the zero derivative of a constant function from the limit definition and distinguish a function’s value from its rate of change.

Intermediate 8 min read

What You'll Learn

  • Define a constant function and identify its constant value.
  • Use the difference quotient to prove that a constant function has derivative zero.
  • State where the derivative conclusion applies on a function’s domain.
  • Interpret a zero derivative as a rate of change, not a function value.
  • Check examples by substituting into the derivative definition.

Why a Constant Function Has Derivative Zero

A constant function does not change its output as its input changes. The derivative measures instantaneous rate of change, so a constant function should have derivative zero. The difference quotient makes that conclusion precise: every nonzero input change produces an output change of zero.

This result is simple, but it is important to interpret it correctly. A function can have derivative zero while its value is nonzero. The derivative describes how the function is changing, not the height of its graph.

Constant Functions and the Derivative Definition

A function \(f\) is constant on a domain \(D\) if there is a fixed real number \(c\) such that \(f(x)=c\) for every \(x\in D\). The number \(c\) is the function’s constant value. For example, \(f(x)=6\) is constant, and its value is \(6\) at every input in its domain.

At an input \(a\) where \(f\) is defined on an open interval around \(a\), the derivative is defined by the limit of the difference quotient, when that limit exists:

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

Here \(h\) is a nonzero input change, and \(a+h\) must remain in the domain. The numerator \(f(a+h)-f(a)\) is the corresponding output change. The quotient compares output change with input change; the limit describes the instantaneous rate of change at \(a\).

Theorem: If \(f(x)=c\) throughout an open interval containing \(a\), then \(f'(a)=0\).

Deriving the Result from the Difference Quotient

To prove the theorem, use the definition at an arbitrary input \(a\) in the interval. Since the function is constant, both \(f(a+h)\) and \(f(a)\) equal \(c\) whenever \(h\) is small enough to keep \(a+h\) in the interval. Thus the output difference is exactly zero for every allowed nonzero \(h\).

1
Write the derivative definition.
For \(a\) in the interval, \(f'(a)=\lim_{h\to0}\frac{f(a+h)-f(a)}{h}\), with \(h\ne0\).
2
Substitute the constant values.
Because \(f(x)=c\) at both inputs, the numerator becomes \(c-c=0\).
3
Evaluate the limit.
For every allowed nonzero \(h\), the quotient is \(0/h=0\), so its limit is \(0\).
$$ \begin{aligned} f'(a) &=\lim_{h\to0}\frac{f(a+h)-f(a)}{h}\\ &=\lim_{h\to0}\frac{c-c}{h}\\ &=\lim_{h\to0}0\\ &=0. \end{aligned} $$

This is a complete argument: it applies to every \(a\) in the interval, and it does not depend on the particular value of \(c\). The constant may be positive, negative, or zero.

Worked Examples

Worked Example: Differentiate a Nonzero Constant

Let \(f(x)=9\) for all real \(x\). Find \(f'(2)\) from the definition.

First write the difference quotient at \(a=2\):

$$ f'(2)=\lim_{h\to0}\frac{f(2+h)-f(2)}{h}. $$

Since \(f\) always has value \(9\), \(f(2+h)=9\) and \(f(2)=9\). For \(h\ne0\),

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

Therefore, \(f'(2)=\lim_{h\to0}0=0\). Check: the function’s value at \(2\) is \(f(2)=9\), while its derivative there is \(f'(2)=0\). The function is not zero; it simply has no change in output.

Worked Example: A Constant Quantity with Units

Suppose \(V(t)=18\) liters for every time \(t\) in an interval. Find the rate of change \(V'(4)\), where time is measured in minutes.

By the difference quotient,

$$ V'(4)=\lim_{h\to0}\frac{V(4+h)-V(4)}{h}. $$

The quantity is constant, so \(V(4+h)=18\) liters and \(V(4)=18\) liters. Thus, for nonzero \(h\),

$$ \frac{V(4+h)-V(4)}{h} =\frac{18\text{ liters}-18\text{ liters}}{h\text{ minutes}} =\frac{0\text{ liters}}{h\text{ minutes}} =0\text{ liters per minute}. $$

Every allowed difference quotient is zero, so \(V'(4)=0\) liters per minute. Check: the rate has the units of output divided by input, liters per minute, and the constant quantity has no change over any time interval.

Worked Example: A Zero Function Value Does Not Force a Zero Derivative

Compare the constant function \(f(x)=0\) with \(g(x)=x-3\) at \(x=3\). Both functions have value zero there. Find their derivatives at that input from the definition.

For \(f\), the difference quotient is

$$ \frac{f(3+h)-f(3)}{h} =\frac{0-0}{h} =0 \qquad (h\ne0). $$

Therefore, \(f'(3)=\lim_{h\to0}0=0\). For \(g\), first evaluate the two function values:

$$ g(3+h)=(3+h)-3=h, \qquad g(3)=3-3=0. $$

So its difference quotient is

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

Thus \(g'(3)=\lim_{h\to0}1=1\). Check: \(f(3)=0\) and \(g(3)=0\), but their derivatives differ: \(f'(3)=0\), whereas \(g'(3)=1\). A function’s value at a point alone does not determine its rate of change there.

What the Zero Derivative Means

The graph of \(f(x)=c\) is a horizontal line. At every point on that line, the tangent has slope zero, which agrees with \(f'(a)=0\). In terms of the difference quotient, the same fact says that every nearby input change has output change zero.

Keep the two quantities distinct:

QuantityWhat it describesFor \(f(x)=c\)
\(f(a)\)The function’s output at input \(a\)\(c\)
\(f'(a)\)The instantaneous rate of change at input \(a\)\(0\)

For a nonzero constant, the graph can lie above or below the horizontal axis and still have slope zero. Conversely, a function can pass through a point where its value is zero and have a nonzero derivative there, as the third example shows.

Where the Result Applies

The derivative at \(a\) in the standard two-sided definition uses inputs on both sides of \(a\). Accordingly, the theorem applies at interior points where the constant function is defined throughout an interval around \(a\). On an interval, every interior point has this property.

If a function is defined only on a restricted domain and \(a\) is an endpoint, there may not be inputs on both sides of \(a\). The standard two-sided derivative definition then does not apply at that endpoint in the same way. The constant-function calculation still shows that any available one-sided difference quotients are zero, but whether an endpoint derivative is being considered depends on the derivative convention and domain.

It is also important that the function be constant near the point in question. Knowing only that \(f(a)=c\) does not say that \(f(a+h)=c\) for nearby inputs. Without that local constancy, the numerator need not be zero.

Common Mistake: Confusing the Function Value with Its Derivative

A common error is to write that if \(f(x)=5\), then \(f'(x)=5\). This copies the function’s value instead of using the definition. At any input \(a\), the incorrect calculation would effectively treat the output value \(5\) as the output change. But a difference quotient uses \(f(a+h)-f(a)\), not \(f(a)\) alone.

$$ \text{Incorrect: }\quad f'(a)=f(a)=5. $$

For the correct calculation, substitute the two function values into the quotient:

$$ \begin{aligned} f'(a) &=\lim_{h\to0}\frac{f(a+h)-f(a)}{h}\\ &=\lim_{h\to0}\frac{5-5}{h}\\ &=\lim_{h\to0}0\\ &=0. \end{aligned} $$

The denominator \(h\) is nonzero in the difference quotient. The quotient is therefore \(0\), not an undefined expression such as \(0/0\). Only after simplifying the quotient for \(h\ne0\) do we take the limit.

Why This Result Is Useful

The derivative of a constant function provides a basic test of what differentiation measures. A derivative records change, not size: a function can have a large constant value and no rate of change. Recognizing this distinction helps prevent errors when interpreting derivatives and when using differentiation rules.

The proof also models a general strategy for deriving derivative facts: start with the limit definition, substitute the function values, simplify the quotient for nonzero input changes, and then evaluate the limit. Here the output difference vanishes exactly, so no additional limit technique is needed.

Check Your Understanding

Answer each question using the derivative definition where requested.

  1. If \(p(x)=-4\) for all real \(x\), what are \(p(1)\) and \(p'(1)\)? Explain why they are different quantities.
  2. For a function constant at \(c\) near \(a\), write its difference quotient and simplify it for \(h\ne0\).
  3. Why must \(h\ne0\) in the difference quotient, and why does simplifying it to zero allow the limit to be evaluated?
  4. Can a function have value zero at \(a\) and a nonzero derivative there? Give the calculation from the third worked example that supports your answer.
  5. What domain condition allows the standard two-sided derivative conclusion for a constant function at \(a\)?

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: 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
Clinical Biostats