There are a few small loose threads to tie up next Tuesday, and you might have questions about yesterday’s lecture. Other than that, I won’t plan anything in particular for next Tuesday. Prepare for the exam as though it’s on Tuesday, and come to class ready to ask specific questions so you can focus your last-minute prep.

Since the last example from yesterday’s class was a little rushed, I thought I’d post it here.

In our zombie example, we assumed two things:

  1. One zombie arrives in New York on day 0,
  2. Each zombie infects one person and turns them into a zombie each day.

We saw that the number of zombies on day n is $2^n$. If there are 8 million people in New York, then to find out how long it takes for everyone in the city to become a zombie, we have to solve the equation:

$2^n=8,000,000$.

Before we solve this equation, I want to point out that it’s similar to one we solved to evaluate a logarithm without without the calculator:

$9^x=3\sqrt{3}$

In this case, we wrote both sides of the equation as powers of 3, and then we equated the exponents to solve for $x$. We could imagine doing something similar to solve the zombie equation—8,000,000 *is* a power of 2—but it’s not an obvious power of 2, so we’ll use logarithms to find $n$.

There are a few methods that are all roughly the same. Here’s the one we discussed in class today.

Method 1

Take the logarithm with base 2 of both sides:

$\log_2(2^n)=\log_2(8,000,000)$.

Use logarithm rule (3); the exponent becomes a coefficient:

$n \log_2(2) = \log_2(8,000,000)$.

Since $\log_2(2)=1$, we have:

$n = \log_2(8,000,000)$.

Some calculators will let you choose your base for your logarithm but most will not. If your calculator will not let you choose base 2, you will have to use the change of base formula:

$log_b(x)= \frac{\log_c(x)}{\log_c(b)}$.

Scientific calculators have a button “log” (remember this means base 10). This is called the “common logarithm.” They also have a button “ln” (remember this means base e which is about 2.718). This is called the “natural logarithm.” It’s up to you whether you want to use the common logarithm or the natural logarithm. If we choose the common logarithm (c=10) for the change of base formula, we get:

$n = \log_2(8,000,000) = \frac{\log(8,000,000}{\log(2)}$.

Plugging this in on the calculator, we see that $n \approx 22.93$. This is close to the answer we got in class, which used that $2^23 = 8,388,608$.

Method 2

Method 2 is almost identical to Method 1 but instead of taking log with base 2 of both sides, we take either the common log (base 10) or ln (base e) to begin with. This means we won’t have to use the change of base formula. I’ll choose base 10 again:

$\log(2^n)=\log(8,000,000)$.

Again, using log rule (3), we get:

$n\log(2)=\log(8,000,000)$.

Now, divide both sides by $\log(2)$:

$n=\frac{\log(8,000,000)}{\log(2)}$.

Notice this is exactly what we got using Method 1 in our last step before pulling out the calculator, so the two answers are equal.

 

Our second example asked us how long it’d take to have \$15,000 in an account if we deposit \$100 and it earns 24% interest, compounded monthly. This means we have to solve the equation:

$ 15,000=100(1+ \frac{0.24}{12})^{12t}$

Again, the variable is in the exponent, so we need logarithms to isolate it. Try using Method 1 or Method 2 to solve this equation.