Algebra 2

Logarithms

A logarithm answers the question "what exponent?": log⁡b(x)=y\log_b(x) = y means by=xb^y = x. So log⁡2(32)=5\log_2(32) = 5 because 25=322^5 = 32. The rules turn products into sums, quotients into differences and powers into multipliers. Solve an exponential equation by taking a log of both sides. Solve a log equation by rewriting it in exponential form, then check that every log input is positive.

Updated

The key idea

Logs and exponents are inverses. Every log statement is an exponent statement read backwards:

log⁡b(x)=y  ⟺  by=x(b>0, b≠1, x>0)\log_b(x) = y \iff b^y = x \qquad (b > 0,\ b \ne 1,\ x > 0)
The same fact in both forms
Exponential formLog form
25=322^5 = 32log⁡2(32)=5\log_2(32) = 5
10−2=0.0110^{-2} = 0.01log⁡(0.01)=−2\log(0.01) = -2
e0=1e^0 = 1ln⁡(1)=0\ln(1) = 0

log⁡\log with no base means base 10, and ln⁡\ln means base e≈2.718e \approx 2.718. The three rules come straight from the exponent rules:

log⁡b(MN)=log⁡bM+log⁡bN,log⁡b(MN)=log⁡bM−log⁡bN,log⁡b(Mp)=plog⁡bM\log_b(MN) = \log_b M + \log_b N, \quad \log_b\left(\frac{M}{N}\right) = \log_b M - \log_b N, \quad \log_b(M^p) = p\log_b M

Change of base lets any calculator find any log:

log⁡b(x)=log⁡xlog⁡b=ln⁡xln⁡b\log_b(x) = \frac{\log x}{\log b} = \frac{\ln x}{\ln b}

Worked examples

Example 1: evaluate a log by hand

Problem Find log⁡4(8)\log_4(8) without a calculator.

  1. Call the answer y. By definition, 4 to the y is 8.
    4y=84^y = 8
  2. Write both sides as powers of 2.
    (22)y=23(2^2)^y = 2^3
  3. Same base, so the exponents must match.
    2y=32y = 3
  4. Divide by 2.
    y=32y = \frac{3}{2}

Answer log⁡4(8)=32\log_4(8) = \frac{3}{2}

Example 2: condense into one log

Problem Write 2log⁡3(x)+log⁡3(5)−log⁡3(x+1)2\log_3(x) + \log_3(5) - \log_3(x + 1) as a single logarithm.

  1. Power rule first: the 2 becomes an exponent.
    2log⁡3(x)+log⁡3(5)−log⁡3(x+1)=log⁡3(x2)+log⁡3(5)−log⁡3(x+1)2\log_3(x) + \log_3(5) - \log_3(x + 1) = \log_3(x^2) + \log_3(5) - \log_3(x + 1)
  2. Product rule: a sum of logs is the log of a product.
    log⁡3(x2)+log⁡3(5)−log⁡3(x+1)=log⁡3(5x2)−log⁡3(x+1)\log_3(x^2) + \log_3(5) - \log_3(x + 1) = \log_3(5x^2) - \log_3(x + 1)
  3. Quotient rule: a difference of logs is the log of a quotient.
    log⁡3(5x2)−log⁡3(x+1)=log⁡3(5x2x+1)\log_3(5x^2) - \log_3(x + 1) = \log_3\left(\frac{5x^2}{x + 1}\right)

Answer log⁡3(5x2x+1)\log_3\left(\frac{5x^2}{x + 1}\right)

Example 3: solve an exponential equation

Problem Solve 52x−1=405^{2x - 1} = 40. Round to three decimal places.

  1. 40 is not a power of 5, so take the log of both sides and use the power rule to bring the exponent down.
    (2x−1)log⁡(5)=log⁡(40)(2x - 1)\log(5) = \log(40)
  2. Divide both sides by log⁡5\log 5.
    2x−1=log⁡(40)log⁡(5)2x - 1 = \frac{\log(40)}{\log(5)}
  3. Add 1 and divide by 2.
    x=12(1+log⁡(40)log⁡(5))x = \frac{1}{2}\left(1 + \frac{\log(40)}{\log(5)}\right)
  4. On a calculator, log⁡40log⁡5≈2.292\frac{\log 40}{\log 5} \approx 2.292, so x≈3.2922x \approx \frac{3.292}{2}.

Answer x≈1.646x \approx 1.646

Example 4 (test-hard): a log equation with an extraneous answer

Problem Solve log⁡2(x)+log⁡2(x−2)=3\log_2(x) + \log_2(x - 2) = 3.

  1. Product rule: combine into one log.
    log⁡2(x(x−2))=3\log_2(x(x - 2)) = 3
  2. Rewrite in exponential form: 23=82^3 = 8.
    x(x−2)=8x(x - 2) = 8
  3. Expand and set to zero.
    x2−2x−8=0x^2 - 2x - 8 = 0
  4. Factor.
    (x−4)(x+2)=0(x - 4)(x + 2) = 0
  5. So x=4x = 4 or x=−2x = -2. But log⁡2(−2)\log_2(-2) is not defined, so −2-2 is extraneous. Check 4: log⁡24+log⁡22=2+1=3\log_2 4 + \log_2 2 = 2 + 1 = 3.

Answer x=4x = 4

Common mistakes

  • Splitting a log of a sum. log⁡(a+b)\log(a + b) is not log⁡a+log⁡b\log a + \log b. Fix: the product rule is for log⁡(ab)\log(ab) only.
  • Canceling logs in a fraction. log⁡40log⁡5\frac{\log 40}{\log 5} is not log⁡8\log 8. Fix: divide the two log values; only log⁡40−log⁡5\log 40 - \log 5 equals log⁡8\log 8.
  • Moving a coefficient the wrong way. 2log⁡3x=log⁡3(x2)2\log_3 x = \log_3(x^2), not log⁡3(2x)\log_3(2x). Fix: the number in front becomes an exponent on the input.
  • Keeping answers that make a log input negative or zero. Fix: after solving, put each answer into every log in the original equation.
  • Mixing up the base and the answer. log⁡232=5\log_2 32 = 5 means 25=322^5 = 32, not 525^2 or 32232^2. Fix: say "2 to what power is 32?"

Quick methods

Practice

5 practice questions

  1. What is log⁡2(164)\log_2\left(\frac{1}{64}\right)?

    1. −6-6
    2. 66
    3. −32-32
    4. 16\frac{1}{6}
    Show answer

    Answer: −6-6

    26=642^6 = 64, so 2−6=1642^{-6} = \frac{1}{64} and the log is −6-6. A fraction less than 1 always gives a negative log when the base is more than 1.

  2. Which expression is equal to log⁡(x)+log⁡(5)−log⁡(2)\log(x) + \log(5) - \log(2) for x>0x > 0?

    1. log⁡(5x2)\log\left(\frac{5x}{2}\right)
    2. log⁡(5x−2)\log(5x - 2)
    3. log⁡(x+3)\log(x + 3)
    4. log⁡(10x)\log(10x)
    Show answer

    Answer: log⁡(5x2)\log\left(\frac{5x}{2}\right)

    Adding logs multiplies the inputs and subtracting divides: log⁡(x⋅52)\log\left(\frac{x \cdot 5}{2}\right). log⁡(5x−2)\log(5x - 2) treats subtracting logs as subtracting inputs, and log⁡(10x)\log(10x) multiplies by 2 instead of dividing.

  3. Solve 3x=203^x = 20. Round to the nearest hundredth.

    1. 0.37
    2. 1.30
    3. 2.73
    4. 6.67
    Show answer

    Answer: 2.73

    x=log⁡20log⁡3≈1.3010.477≈2.73x = \frac{\log 20}{\log 3} \approx \frac{1.301}{0.477} \approx 2.73. 0.37 divides the logs upside down, 1.30 is just log⁡20\log 20, and 6.67 is 20÷320 \div 3. Check: 32.73≈203^{2.73} \approx 20.

  4. Solve log⁡3(x+1)=4\log_3(x + 1) = 4.

    1. 1111
    2. 6363
    3. 8080
    4. 8282
    Show answer

    Answer: 8080

    Exponential form: x+1=34=81x + 1 = 3^4 = 81, so x=80x = 80. 63 uses 434^3 instead of 343^4, and 11 uses 3⋅43 \cdot 4.

  5. Solve log⁡5(x)+log⁡5(x−4)=1\log_5(x) + \log_5(x - 4) = 1.

    Show answer

    Answer: 5

    Combine: log⁡5(x(x−4))=1\log_5(x(x - 4)) = 1, so x2−4x=5x^2 - 4x = 5, which factors as (x−5)(x+1)=0(x - 5)(x + 1) = 0. x=−1x = -1 makes log⁡5(x)\log_5(x) undefined, so only x=5x = 5 works.

Frequently asked questions

What is the difference between log and ln?

Both are logarithms with different bases. log⁡\log with no base written usually means base 10, the common log. ln⁡\ln is base ee, about 2.718, the natural log. They follow the same rules, and either one works for change of base.

Why can't you take the log of a negative number?

A log asks what power of a positive base gives the input. A positive base raised to any real power is always positive, so no real exponent gives 0 or a negative number. That is why answers that make a log input zero or negative get thrown out.

How do I use the change of base formula?

Divide the log of the input by the log of the base, using the same kind of log on top and bottom: log⁡2(10)=log⁡10log⁡2≈3.32\log_2(10) = \frac{\log 10}{\log 2} \approx 3.32. Check by raising: 23.322^{3.32} is about 10.

Is log(a + b) equal to log a + log b?

No. The product rule says log⁡(ab)=log⁡a+log⁡b\log(ab) = \log a + \log b. There is no rule that splits a log of a sum, so leave log⁡(a+b)\log(a + b) as it is. For example, log⁡(10+10)=log⁡20≈1.30\log(10 + 10) = \log 20 \approx 1.30, but log⁡10+log⁡10=2\log 10 + \log 10 = 2.

Try asking Ducky

  • “Can you explain what a log actually means with a simple example?”
  • “I got x = -2 and x = 4. Why is only 4 right?”
  • “Give me five log rule problems and check my answers.”

Free to start. The web app works in any browser, Chromebooks included; the Mac app can also draw on your real screen.