8.5 Solving Exponentials for Time- Logarithms
Earlier, we found that since Olympia, WA had a population of 245 thousand in 2008 and had been growing at 3% per year, the population could be modeled by the equation
or equivalently,
Using this equation, we were able to predict the population in the future.
Suppose we wanted to know when the population of Olympia would reach 400 thousand. Since we are looking for the year n when the population will be 400 thousand, we would need to solve the equation
# Ch 8.5 - a logarithm is the tool that pulls n down out of the exponent.
from math import log10
P0, R, TARGET = 245, 0.03, 400 # Olympia WA, thousands of people, from 2008
# TRY IT: TARGET = 490 (double). TRY IT: R = 0.015 - does the time just double?
n = log10(TARGET / P0) / log10(1 + R)
print(f"{TARGET} = {P0}(1 + {R})^n")
print(f" divide by {P0} : {TARGET / P0:.4f} = {1 + R}^n")
print(f" log both sides : log({TARGET / P0:.4f}) = n log({1 + R})")
print(f" divide : n = {log10(TARGET / P0):.5f} / {log10(1 + R):.5f} = {n:.3f} years")
print(f" so during {2008 + n:.0f}\n")
print("how long to reach various sizes (thousands of people):")
for target in (300, 400, 490, 600, 980):
t = log10(target / P0) / log10(1 + R)
note = " <- double the 2008 size" if target == 2 * P0 else ""
print(f" {target:>4} -> n = {t:>6.2f} years ({2008 + t:.0f}){note}")
print(" Notice the gaps: each DOUBLING takes the same time, no matter how big")
print(f" the city already is. Doubling time = {log10(2) / log10(1 + R):.2f} years.\n")
# The same algebra works when the quantity is SHRINKING: r is negative.
START, KEEP, GOAL = 10_000_000, 0.10, 500 # each filter keeps 10% of the pollutant
filters = log10(GOAL / START) / log10(KEEP)
print(f"pollution filters: {START:,} particles per gallon, each filter removes 90%")
print(f" {GOAL} = {START}({KEEP})^n -> n = {filters:.3f} filters")
print(f" you cannot install {filters:.3f} filters, so use {-(-filters // 1):.0f}")
for f in range(6):
print(f" after {f} filter(s): {START * KEEP ** f:>12,.2f} particles per gallon")
One approach to this problem would be to create a table of values, or to use technology to draw a graph to estimate the solution.
From the graph, we can estimate that the solution will be around 16 to 17 years after 2008 (2024 to 2025). This is pretty good, but we’d really like to have an algebraic tool to answer this question. To do that, we need to introduce a new function that will undo exponentials, similar to how a square root undoes a square. For exponentials, the function we need is called a logarithm. It is the inverse of the exponential, meaning it undoes the exponential. While there is a whole family of logarithms with different bases, we will focus on the common log, which is based on the exponential 10x.
It is helpful to note that from the first three parts of the previous example that the number we’re taking the log of has to get times bigger for the log to increase in value by 1.
Of course, most numbers cannot be written as a nice simple power of 10. For those numbers, we can evaluate the log using a scientific calculator with a log button.
With an equation, just like we can add a number to both sides, multiply both sides by a number, or square both sides, we can also take the logarithm of both sides of the equation and end up with an equivalent equation. This will allow us to solve some simple equations.
This approach allows us to solve exponential equations with powers of 10, but what about problems like from earlier, which have a base of 1.03? For that, we need the exponent property for logs.
To show why this is true, we offer a proof.
Since the logarithm and exponential undo each other, . So
Utilizing the exponential rule that states ,
So then
Again utilizing the property that the log undoes the exponential on the right side yields the result
This property will finally allow us to answer our original question.
Alternatively, after applying the exponent property of logs on the right side, we could have evaluated the logarithms to decimal approximations and completed our calculations using those approximations, as you’ll see in the next example. While the final answer may come out slightly differently, as long as we keep enough significant values during calculation, our answer will be close enough for most purposes.
Adapted from Math in Society by David Lippman, hosted on LibreTexts (math.libretexts.org) and licensed under CC BY-SA 3.0. Changes were made. License: CC-BY-SA-3.0.