PrecalculusToward Calculus

The Difference Quotient

[f(x + h) − f(x)]/h is the slope of a secant line.

Not started Jump to practice

The average rate of change of $f$ between two inputs is rise over run. If the inputs are $x$ and $x + h$, that slope has a general formula. Simplifying it is the first step toward calculus, and it relies on evaluating a function at an expression like $x + h$.

Key idea

The difference quotient $$\frac{f(x + h) - f(x)}{h}, \quad h \ne 0,$$ is the slope of the secant line through $(x, f(x))$ and $(x + h, f(x + h))$. To simplify: find $f(x + h)$ by replacing every $x$ with $(x + h)$, subtract $f(x)$, then divide out the factor $h$.

Why it works

The two points are $h$ apart horizontally (the run) and $f(x + h) - f(x)$ apart vertically (the rise). As $h$ shrinks, the second point slides toward the first and the secant line turns into the tangent line. Calculus studies exactly what the difference quotient approaches as $h \to 0$, so getting it into a form where $h$ is not in the denominator is the key move.
Shrink $h$: the secant line through the two points swings toward the dashed tangent line, and its slope approaches $2$.

Worked examples

Worked example: A quadratic

For $f(x) = x^2 + 3x$, simplify the difference quotient.
  1. $$f(x + h) = (x + h)^2 + 3(x + h) = x^2 + 2xh + h^2 + 3x + 3h.$$
  2. Subtract $f(x) = x^2 + 3x$: $2xh + h^2 + 3h$.
  3. Divide by $h$: $2x + h + 3$.

Answer: $2x + h + 3$

Worked example: A reciprocal

For $f(x) = \dfrac{1}{x}$, simplify the difference quotient.
  1. $$f(x + h) - f(x) = \dfrac{1}{x + h} - \dfrac{1}{x} = \dfrac{x - (x + h)}{x(x + h)} = \dfrac{-h}{x(x + h)}.$$
  2. Divide by $h$.

Answer: $-\frac{1}{x(x + h)}$

Worked example: With numbers

For $f(x) = x^2$, find the slope of the secant from $x = 3$ to $x = 3.1$.
  1. $\dfrac{f(3.1) - f(3)}{0.1} = \dfrac{9.61 - 9}{0.1}$.
  2. $= 6.1$. The formula $2x + h$ with $x = 3$, $h = 0.1$ agrees.

Answer: $6.1$

Common mistake

Writing $f(x + h)$ as $f(x) + h$ or as $f(x) + f(h)$. Replace every $x$ in the formula with $(x + h)$, parentheses included. Check with numbers: for $f(x) = x^2$, $f(2 + 1) = 9$, but $f(2) + 1 = 5$ and $f(2) + f(1) = 5$.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 2 XP.

Loading practice…

Builds on

Leads to

Sources and further reading

  • OpenStax Precalculus 2e, Section 1.3 Rates of Change and Behavior of Graphs
  • OpenStax Precalculus 2e, Section 12.4 Derivatives
@teddyrookbook GitHub