AP Precalculus · Study guide

Logarithmic Function Context and Data Modeling

AP® Precalculus · Unit 2 · Exponential and Logarithmic Functions

Logarithmic Models

Some quantities climb quickly at first and then more and more slowly, adding a fixed amount each time another quantity is multiplied. Logarithmic functions model them. This guide builds those models from scales, from data points, from a regression, and uses them in both directions.

The idea in one paragraph

A logarithmic model fits when the inputs change proportionally (are multiplied by the same factor) over equal-length output intervals: each doubling, or each factor of 10, adds the same amount to the output. A model \(y = a + b\log_c x\) can be built from that proportion and a known zero, from two input-output pairs, from transformations of \(a\log_b x\), or from a logarithmic regression. The natural log \(\ln x\) is the usual choice with technology. A model can predict outputs and, by solving the equation, find the input that gives a target output.

1When a logarithmic model fits

Look for fast early change that slows down without leveling off, or for data where multiplying the input adds a steady amount to the output. That is the reverse of exponential growth, where adding to the input multiplies the output.

Worked Example 1 From a proportion and a zero

A quantity is 0 when \(x = 1\) and goes up by 5 every time \(x\) doubles. Write a model.

  1. 1
    “Up by a fixed amount each time the input is multiplied by 2” is logarithmic with base 2.
  2. 2
    Zero at \(x = 1\) fits \(\log_2 1 = 0\). Each doubling adds 1 to \(\log_2 x\), so multiply by 5.
  3. 3
    Check: \(5\log_2 8 = 15\) and \(5\log_2 16 = 20\), up by 5.
Answer: \(y = 5\log_2 x\)

2Logarithmic scales in context

Decibels, pH and earthquake magnitude all use logarithms so that huge ranges of intensity become a short range of numbers. A difference of \(d\) on the scale means a factor of \(10^d\) in the underlying quantity (or \(10^{d/10}\) for decibels).

Worked Example 2 Sound in decibels

Sound level is \(L = 10\log\dfrac{I}{I_0}\) decibels, where \(I_0\) is the faintest audible intensity. How many decibels louder is a sound 1000 times as intense?

  1. 1
    Multiplying \(I\) by 1000 adds \(10\log 1000 = 10 \cdot 3 = 30\) to \(L\) (product property).
  2. 2
    This is the logarithmic pattern: multiplying the input adds a fixed amount to the output.
Answer: 30 decibels louder.
Worked Example 3 Acidity

The pH of a solution is \(-\log[\mathrm{H^+}]\). Find the pH when \([\mathrm{H^+}] = 3.2 \times 10^{-4}\), and compare pH 5 with pH 7.

  1. 1
    \(-\log(3.2 \times 10^{-4}) \approx 3.49\).
  2. 2
    A drop of 2 in pH means \([\mathrm{H^+}]\) is multiplied by \(10^2 = 100\).
Answer: pH about 3.49; a pH 5 solution has 100 times the hydrogen ion concentration of a pH 7 solution.
Common Mistake 1 · Treating a log scale difference as a difference

pH 5 is not “2 more acidic” than pH 7. The concentrations differ by a factor of \(10^2 = 100\).

3Building a model

With two points, substitute both into \(y = a + b\log_c x\) and solve the two equations for \(a\) and \(b\). Choosing \(c\) to match the inputs (base 2 for doublings, base 10 for powers of 10) keeps the arithmetic simple.

Worked Example 4 From two data points

A model \(y = a + b\log_2 x\) passes through \((2, 5)\) and \((8, 11)\). Find it and its zero.

  1. 1
    \(\log_2 2 = 1\) and \(\log_2 8 = 3\), so \(a + b = 5\) and \(a + 3b = 11\).
  2. 2
    Subtract: \(2b = 6\), so \(b = 3\) and \(a = 2\). The model is \(y = 2 + 3\log_2 x\).
  3. 3
    Zero: \(3\log_2 x = -2\), so \(x = 2^{-2/3} \approx 0.63\).
Answer: \(y = 2 + 3\log_2 x\), with zero \(x \approx 0.63\).
Write it like this

“Each time \(x\) doubles, the model \(y = 2 + 3\log_2 x\) increases by 3, because \(\log_2(2x) = 1 + \log_2 x\).”

4Regression and solving for the input

Figure 1. Fast early gains that slow down over time are the signature of a logarithmic model: equal output gains need the input to be multiplied, not increased by a fixed amount.
Worked Example 5 Regression, prediction, and solving for the input

Typing speed (words per minute) after \(x\) weeks of practice is recorded. Fit a logarithmic model, predict week 20, and find when speed reaches 60 wpm.

weeks1246812
wpm202938434752
  1. 1
    Gains shrink as weeks pass, but each doubling of weeks (1 to 2, 2 to 4, 4 to 8) adds about 9 wpm: a logarithmic pattern. Run logarithmic regression: \(y \approx 20.04 + 12.89\ln x\). Every residual is smaller than 0.2 wpm.
  2. 2
    Predict: \(y(20) \approx 20.04 + 12.89\ln 20 \approx 58.7\) wpm.
  3. 3
    Solve \(20.04 + 12.89\ln x = 60\): \(\ln x \approx 3.100\), so \(x = e^{3.100} \approx 22.2\) weeks.
Answer: About 58.7 wpm at week 20; 60 wpm after about 22.2 weeks (both beyond the data, so less certain).
Common Mistake 2 · Expecting a ceiling

Typing speed may well level off in real life, but the logarithmic model never does: it keeps growing without bound. If the context has a ceiling, the model is only trustworthy over the range of the data.

Common Mistake 3 · Solving by dividing out the ln

From \(12.89\ln x = 39.96\), the step is \(\ln x = 3.100\) and then \(x = e^{3.100}\), not \(x = 3.100\). Undo the ln with an exponential.

Quick reference

SituationModel or move
Each factor of c in x adds k to y\(y = a + k\log_c x\)
Zero at x = 1\(a = 0\)
Two pointsTwo equations in a and b
Data with fast-then-slow growthLogarithmic regression, \(y = a + b\ln x\)
Find the input for a target yIsolate \(\ln x\), then \(x = e^{(\ldots)}\)