Tutorials › AP Calculus › Finding a Linear Function’s Derivative from the Limit

Derivative as a Limit · Tutorial 89 of 999

Finding a Linear Function’s Derivative from the Limit

Evaluate a linear function’s difference quotient directly and use the limit definition to find its derivative at any input.

Beginner 9 min read

What You'll Learn

  • Set up the difference quotient for a linear function at an arbitrary input
  • Simplify the quotient while keeping its increment nonzero
  • Derive the derivative from the limit definition
  • Explain why the constant term does not affect the derivative
  • Identify a common error involving division by a zero increment

Why a Linear Function Is a Useful First Example

A derivative describes how a function changes near an input. The limit definition can involve substantial algebra for some functions, but a linear function makes the central idea especially clear: its rate of change is already the same over every interval. We can verify this directly, without relying only on that geometric observation.

In this tutorial, a linear function has the form \(f(x)=mx+b\), where \(m\) and \(b\) are fixed real numbers. The number \(m\) is the slope, and \(b\) is the vertical intercept. We will calculate the difference quotient at an arbitrary input and take its limit.

The Derivative from the Limit Definition

For a function \(f\), its derivative at an input \(a\), if the limit exists, is defined by the limit of the difference quotient. In the \(h\)-form, the input changes from \(a\) to \(a+h\), where \(h\) is nonzero while the quotient is formed.

Definition: The derivative of \(f\) at \(a\) is \(f'(a)=\displaystyle\lim_{h\to 0}\frac{f(a+h)-f(a)}{h}\), provided this limit exists. The quotient is formed for \(h\ne 0\); the limit describes what happens as those nonzero values of \(h\) approach zero.

The derivative definition is not the same as substituting \(h=0\) into the quotient. At \(h=0\), the denominator would be zero, so the quotient would not be defined. Instead, we simplify the quotient for \(h\ne 0\), then determine its limit as \(h\) approaches zero.

Deriving the Derivative of \(f(x)=mx+b\)

Let \(a\) be any real input. Since \(f(x)=mx+b\), evaluate the function at \(a+h\) and at \(a\):

$$ f(a+h)=m(a+h)+b=ma+mh+b $$
$$ f(a)=ma+b. $$

Substitute these expressions into the difference quotient. In the simplification, the terms \(ma\) and \(b\) cancel, leaving a factor of \(h\) in the numerator. Because the quotient is being formed for \(h\ne 0\), that factor can be canceled.

$$ \begin{aligned} \frac{f(a+h)-f(a)}{h} &=\frac{(ma+mh+b)-(ma+b)}{h}\\ &=\frac{mh}{h}\\ &=m,\qquad h\ne 0. \end{aligned} $$

This calculation shows more than just what happens near zero: for every nonzero \(h\), the difference quotient is exactly \(m\). Therefore, as \(h\) approaches zero, the quotient remains equal to \(m\), and its limit is \(m\).

Theorem: If \(f(x)=mx+b\) for real constants \(m\) and \(b\), then \(f\) is differentiable at every real input \(a\), and \(f'(a)=m\).

For completeness, the limit claim can be checked directly. Given any \(\varepsilon>0\), choose \(\delta=1\). Whenever \(0<|h|<\delta\), the simplified quotient \(Q(h)\) equals \(m\), so \(|Q(h)-m|=0<\varepsilon\). This is precisely the condition that \(Q(h)\) tends to \(m\) as \(h\) tends to zero. The result holds for every real \(a\), so the derivative value is the same at every input.

The proof also explains why \(b\) does not affect the derivative: the same \(b\) appears in both function values and cancels in their difference. The slope \(m\), by contrast, is the coefficient that remains after the changing input contributes the factor \(h\).

Worked Examples

Worked Example: A Positive Slope at a Specific Input

Find the derivative of \(f(x)=3x+2\) at \(a=4\) using the limit definition.

First calculate the two function values in the difference quotient:

$$ f(4+h)=3(4+h)+2=12+3h+2=14+3h $$
$$ f(4)=3(4)+2=12+2=14. $$

For \(h\ne0\), substitute and simplify:

$$ \begin{aligned} \frac{f(4+h)-f(4)}{h} &=\frac{(14+3h)-14}{h}\\ &=\frac{3h}{h}\\ &=3. \end{aligned} $$

Taking the limit as \(h\to0\) gives \(f'(4)=3\). To check the calculation, the quotient equals \(3\) for every nonzero \(h\), so its limit is indeed \(3\). This agrees with the function’s slope.

Worked Example: A Negative Slope at a Negative Input

Find \(f'(-1)\) for \(f(x)=-2x+5\) from the limit definition.

Evaluate the function at the two required inputs:

$$ f(-1+h)=-2(-1+h)+5=2-2h+5=7-2h $$
$$ f(-1)=-2(-1)+5=2+5=7. $$

Now form the quotient, keeping \(h\ne0\):

$$ \begin{aligned} \frac{f(-1+h)-f(-1)}{h} &=\frac{(7-2h)-7}{h}\\ &=\frac{-2h}{h}\\ &=-2. \end{aligned} $$

Thus \(f'(-1)=\displaystyle\lim_{h\to0}(-2)=-2\). The check is direct: the quotient is \(-2\) for every allowed increment, so the limit is \(-2\), including when the input \(a\) is negative.

Worked Example: Finding the Derivative at an Arbitrary Input

For \(f(x)=\frac{1}{2}x-3\), find the derivative at an arbitrary real input \(c\). This example uses the \(x\)-to-\(a\) form, in which the nearby input is \(x\) and \(x\ne c\) while the quotient is formed.

First evaluate the function at \(x\) and \(c\):

$$ f(x)=\frac{1}{2}x-3 \qquad\text{and}\qquad f(c)=\frac{1}{2}c-3. $$

Subtract and factor the numerator before dividing:

$$ \begin{aligned} \frac{f(x)-f(c)}{x-c} &=\frac{\left(\frac{1}{2}x-3\right)-\left(\frac{1}{2}c-3\right)}{x-c}\\ &=\frac{\frac{1}{2}x-3-\frac{1}{2}c+3}{x-c}\\ &=\frac{\frac{1}{2}(x-c)}{x-c}\\ &=\frac{1}{2},\qquad x\ne c. \end{aligned} $$

As \(x\to c\), the quotient remains \(\frac{1}{2}\), so \(f'(c)=\frac{1}{2}\) for every real \(c\). To check, the quotient equals \(\frac{1}{2}\) at every allowed \(x\), and therefore its limit is \(\frac{1}{2}\). The constant \(-3\) cancels when the function values are subtracted.

How the Two Quotient Forms Express the Same Change

The \(h\)-form compares \(f(a+h)\) with \(f(a)\). The \(x\)-to-\(a\) form compares \(f(x)\) with \(f(a)\), with \(x\ne a\). They describe the same difference quotient under the substitution \(x=a+h\), or \(h=x-a\). As \(h\to0\), the corresponding input \(x=a+h\) approaches \(a\).

For a linear function, both forms reduce to \(m\). In the \(x\)-to-\(a\) form, the calculation for any \(a\) is:

$$ \begin{aligned} \frac{f(x)-f(a)}{x-a} &=\frac{(mx+b)-(ma+b)}{x-a}\\ &=\frac{m(x-a)}{x-a}\\ &=m,\qquad x\ne a. \end{aligned} $$

Because this quotient is constant for every \(x\ne a\), its limit as \(x\to a\) is \(m\). This provides the same derivative result using the other common form of the limit definition.

A Common Mistake: Setting the Increment to Zero Too Soon

A tempting but invalid calculation is to put \(h=0\) in the original quotient. For example, for \(f(x)=3x+2\) at \(a=4\), the quotient is \(\frac{3h}{h}\). Substituting \(h=0\) before simplifying gives \(\frac{0}{0}\), which is undefined. It does not give the derivative, and it does not mean that the limit fails to exist.

The correction is to remember that the quotient is defined for \(h\ne0\). For those values, \(\frac{3h}{h}=3\). Only after simplifying do we take the limit, obtaining \(\displaystyle\lim_{h\to0}3=3\). Canceling \(h\) is valid here because the calculation is made for nonzero \(h\), not because \(h\) has been set equal to zero.

A second useful check is to keep track of what each term does. The constant term cancels; the slope coefficient remains. If a calculation leaves \(b\) in the final derivative, or makes the result depend on the input \(a\), revisit the subtraction and simplification.

Why the Result Matters

This direct calculation connects the limit definition to a familiar property of straight lines. Every secant line between two distinct points on the graph of \(f(x)=mx+b\) has slope \(m\): for inputs \(x_1\ne x_2\), the change in output is \(m(x_2-x_1)\), and dividing by the input change gives \(m\). The limit calculation confirms that the instantaneous rate at any input is that same value.

The result also gives a simple way to check a derivative calculation. If the function is of the form \(mx+b\), its derivative at every input must be \(m\). This conclusion comes from the definition itself, not from a shortcut rule: the worked algebra shows exactly why the limit exists and what it equals.

Key takeaway: For \(f(x)=mx+b\), the difference quotient simplifies to \(m\) whenever its increment is nonzero. Therefore the limit exists at every input, and \(f'(a)=m\) for every real \(a\).

Check Your Understanding

Use the limit definition where requested, and keep the increment nonzero until after simplifying the quotient.

  1. For \(f(x)=5x-1\), write and simplify the \(h\)-form difference quotient at an arbitrary input \(a\). What is \(f'(a)\)?
  2. Use the limit definition to find \(g'(2)\) when \(g(x)=-4x+7\).
  3. For \(q(x)=\frac{3}{2}x+6\), simplify \(\frac{q(x)-q(c)}{x-c}\) for \(x\ne c\). What does its limit as \(x\to c\) equal?
  4. Why is substituting \(h=0\) into the original difference quotient not a valid way to evaluate the derivative?
  5. In the calculation for \(f(x)=mx+b\), which term cancels, and which coefficient remains in the derivative?

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