Sub topic 1
Exponentials and Logarithms as Inverses
Every method in this tutorial depends on one fact: an exponential function and a logarithmic function with the same base undo each other. If the unknown sits in an exponent, apply a logarithm to bring it down. If the unknown sits inside a logarithm, apply an exponential to free it. This chapter sets up that fact precisely, shows where it holds, and warns you about the points where it fails.
Prerequisites
This chapter assumes you can do the following:
- Solve linear and quadratic equations.
- Apply the exponent rules for integer and rational exponents, such as b^m · b^n = b^(m+n) and b^(-n) = 1/b^n.
- Use function notation and understand what an inverse function is: f⁻¹(f(x)) = x and f(f⁻¹(y)) = y.
- Use a calculator for powers and logarithms.
The definition
A logarithm answers one question: what exponent do I put on the base to get this number? For a base b with b > 0 and b ≠ 1:
log_b(x) = y exactly when b^y = x
The two statements say the same thing in different forms. The first is logarithmic form and the second is exponential form. Here are some examples:
| Logarithmic form | Exponential form | Value |
|---|---|---|
| log_2(32) = 5 | 2^5 = 32 | 5 |
| log_10(0.001) = -3 | 10^(-3) = 0.001 | -3 |
| log_9(3) = 1/2 | 9^(1/2) = 3 | 1/2 |
| log_b(1) = 0 | b^0 = 1 | 0 |
| log_b(b) = 1 | b^1 = b | 1 |
The base restrictions exist for good reasons. A base of 1 would make 1^y = 1 for every y, so the function would not be one-to-one and could not have an inverse. A negative base would make b^y undefined for many real y, such as (-2)^(1/2). A base of 0 would give 0^y = 0 for every positive y, which is again not one-to-one.
Two cancellation identities
Because f(x) = b^x and g(x) = log_b(x) are inverse functions, composing them in either order returns the input:
- log_b(b^x) = x for every real number x
- b^(log_b(x)) = x for every x > 0
Read the first as "the logarithm strips the exponential off." Read the second as "the exponential strips the logarithm off."
The two identities have different domain conditions, and this difference causes many errors later. The exponential b^x accepts any real x, so logb(b^x) = x works for every real x. The expression b^(logb(x)) only makes sense when log_b(x) exists, so it requires x > 0.
Here is how the identities evaluate expressions:
- log_5(5^7) = 7
- 3^(log_3(8)) = 8
- ln(e^(2x+1)) = 2x + 1
- 10^(log(x² + 1)) = x² + 1, which is valid for all real x because x² + 1 > 0
- e^(ln(x - 4)) = x - 4, but only for x > 4
Domain, range, and the mirror image
Inverse functions swap their inputs and outputs, so the domain of one is the range of the other. For b > 1:
| Property | y = b^x | y = log_b(x) |
|---|---|---|
| Domain | all real numbers | x > 0 |
| Range | y > 0 | all real numbers |
| Key point | (0, 1) | (1, 0) |
| Asymptote | horizontal, y = 0 | vertical, x = 0 |
| Behavior | increasing | increasing |
The graph of y = log_b(x) is the graph of y = b^x reflected across the line y = x. Every point (a, c) on the exponential curve matches the point (c, a) on the logarithmic curve. The horizontal asymptote y = 0 becomes the vertical asymptote x = 0.
Two consequences follow, and the rest of the tutorial uses both.
- An exponential never outputs zero or a negative number. An equation such as 2^x = -4 has no real solution. You can see this without any algebra, since the range of b^x is y > 0.
- A logarithm only accepts positive inputs. Writing logb(-3) or logb(0) is an error, because no power of a positive base gives a nonpositive result.
Using the inverse to isolate a variable
The method works like any other algebra step. To undo an operation, apply its inverse to both sides. You subtract to undo adding, and you take a square root to undo squaring. To undo an exponential with base b, take logb of both sides. To undo logb, make both sides exponents of b.
Example 1: unknown in the exponent, with a nice answer.
Solve 2^x = 32.
Take log base 2 of both sides: log2(2^x) = log2(32). The cancellation identity turns the left side into x, so x = log_2(32) = 5.
Example 2: unknown inside a logarithm.
Solve log_3(x + 1) = 4.
Raise 3 to each side: 3^(log_3(x+1)) = 3^4. The left side becomes x + 1, so x + 1 = 81 and x = 80.
Check that the argument is valid: x + 1 = 81 > 0, so the solution stands.
Example 3: natural logarithm, exact answer.
Solve ln(x - 1) = 2.
The natural logarithm has base e, so raise e to each side: x - 1 = e². Then x = 1 + e². The decimal approximation is about 8.389. The exact form 1 + e² is usually preferred, and the decimal is for when you need a number to use.
Example 4: isolate first, then invert.
Solve 5 · 4^(x) - 3 = 17.
Isolate the exponential before applying any logarithm. Add 3 to get 5 · 4^x = 20, then divide by 5 to get 4^x = 4. So x = 1.
Isolating first matters. If you took a logarithm of the original equation, you would have to take the log of a sum, and log(a + b) does not simplify to anything useful.
Checking the identities numerically
A short script confirms both cancellation identities, and shows what happens outside the domain. Floating-point arithmetic means the results match only to rounding error, so the script compares them with math.isclose.
import math
b = 2.0
# log_b(b**x) = x for every real x
for x in (-3, 0.5, 4, 10):
round_trip = math.log(b ** x, b)
print(x, round_trip, math.isclose(round_trip, x))
# b**(log_b(y)) = y for every y > 0
for y in (0.25, 1, 7, 100):
round_trip = b ** math.log(y, b)
print(y, round_trip, math.isclose(round_trip, y))
# Outside the domain, the logarithm does not exist
try:
math.log(-1, b)
except ValueError as error:
print("ValueError:", error)The first two loops print True on every line. The last block prints a ValueError, which is the program's version of "log of a negative number is undefined."
Common errors
- Taking the log of a sum. From 2^x + 3 = 11, writing x·log 2 + log 3 = log 11 is wrong. Isolate the exponential first: 2^x = 8, so x = 3.
- Using the wrong base to undo. To cancel 5^x you need log base 5 (or any base, with a change of base later). Applying log base 2 to 5^x does not give x.
- Forgetting that b^(log_b x) needs x > 0. Simplifying e^(ln(x²)) to x² is valid for x ≠ 0, but simplifying e^(ln(x)) to x is valid only for x > 0. When a variable is inside a logarithm, note the domain before you cancel.
- Believing log_b(x) can be negative only if b < 1. The logarithm of a number between 0 and 1 is negative for b > 1. For example log_2(1/8) = -3. Negative outputs are fine. Negative inputs are not.
- Treating log_b as multiplication. The expression logb(x) is a function applied to x, not "logb times x." You cannot divide both sides of an equation by "log" to remove it.
The method in one line
When you meet an equation with the unknown in an exponent or in a logarithm, ask which operation is currently "outermost" on the unknown, and apply its inverse to both sides. Before you can do that, you often need algebra to isolate that outermost piece. The remaining chapters supply the tools for those isolating steps: the logarithm rules, the change of base formula, and the one-to-one property.
Exercise
Evaluate each expression without a calculator: (a) log4(64), (b) 7^(log7(12)), (c) log10(10^(-2.5)), (d) log2(1/16).
Show answer
(a) 3, because 4^3 = 64. (b) 12, by the identity b^(logb(x)) = x with x = 12 > 0. (c) -2.5, by the identity logb(b^x) = x. (d) -4, because 2^(-4) = 1/16.
Exercise
Solve 3 · 5^x + 2 = 77 by isolating the exponential and then recognizing the power of 5.
Show answer
Subtract 2 to get 3 · 5^x = 75. Divide by 3 to get 5^x = 25. Since 25 = 5^2, x = 2. Check: 3 · 25 + 2 = 77.
Exercise
Solve log_5(2x - 3) = 2. State the condition on x that the logarithm requires, and confirm your answer meets it.
Show answer
Rewrite in exponential form: 2x - 3 = 5^2 = 25, so 2x = 28 and x = 14. The logarithm requires 2x - 3 > 0, which means x > 3/2. Since 14 > 3/2, the solution is valid. Check: 2(14) - 3 = 25 and log_5(25) = 2.
Exercise
A student simplifies e^(ln(x)) to x for the equation e^(ln(x)) = -6 and concludes x = -6. Explain what is wrong and give the correct solution set.
Show answer
The identity e^(ln(x)) = x holds only for x > 0, because ln(x) is undefined otherwise. The value x = -6 is outside the domain of ln, so it is not a solution. For x > 0, the equation becomes x = -6, which is impossible. The solution set is empty. This also follows from the range of e^t, which is always positive and never equals -6.