Sub topic 12
Exponential equations in quadratic form
What you need first
This chapter assumes you can:
- solve quadratic equations by factoring and by the quadratic formula,
- apply exponent rules such as
b^(2x) = (b^x)^2andb^(x+1) = b·b^x, - convert between exponential and logarithmic form, and take a logarithm of both sides of an equation.
Earlier chapters showed two ways to solve an exponential equation: match the bases, or take a logarithm of both sides. Some equations resist both because the exponential expression appears in more than one form, as in e^(2x) - 5e^x + 6 = 0. You cannot match bases, and taking a logarithm of a sum does not help. These equations are quadratics in disguise.
Recognizing the pattern
An equation is in quadratic form when one exponential expression appears squared, to the first power, and as a constant term. If you replace that expression with a new variable u, you get a·u^2 + b·u + c = 0.
The key identity is b^(2x) = (b^x)^2. The exponent 2x is exactly twice the exponent x, which is what makes the substitution work.
| Equation | Substitution | Quadratic in u |
|---|---|---|
| `e^(2x) - 5e^x + 6 = 0` | `u = e^x` | `u^2 - 5u + 6 = 0` |
| `4^x - 3·2^x - 4 = 0` | `u = 2^x` | `u^2 - 3u - 4 = 0` |
| `9^x - 4·3^(x+1) + 27 = 0` | `u = 3^x` | `u^2 - 12u + 27 = 0` |
| `e^x + e^(-x) = 3` | `u = e^x`, then multiply by `u` | `u^2 - 3u + 1 = 0` |
Some equations need rewriting before the pattern shows. In the second row, 4^x becomes (2^2)^x = (2^x)^2. In the third row, 3^(x+1) becomes 3·3^x.
The method
- Rewrite every exponential term using one base, so the exponents are
xand2x(orxand-x). - Substitute
u = b^xand solve the quadratic foru. - Reject any root with
u ≤ 0, becauseb^xis always positive forb > 0. - Convert each remaining root back with a logarithm:
x = log_b(u). - Check the answers in the original equation.
Step 3 is where this type differs from an ordinary quadratic. The quadratic in u may have two perfectly good roots, but only the positive ones correspond to real values of x.
Worked example 1: a clean factoring case
Solve e^(2x) - 5e^x + 6 = 0.
Let u = e^x. Then u^2 - 5u + 6 = 0, which factors as (u - 2)(u - 3) = 0. So u = 2 or u = 3. Both are positive. Back-substituting gives e^x = 2, so x = ln 2, and e^x = 3, so x = ln 3.
The exact solutions are x = ln 2 and x = ln 3. The decimals are about 0.6931 and 1.0986.
import math
# Solve e**(2x) - 5*e**x + 6 = 0
# Let u = e**x: u**2 - 5u + 6 = 0, so u = 2 or u = 3, so x = ln(2) or x = ln(3)
for u in (2, 3):
x = math.log(u)
residual = math.exp(2 * x) - 5 * math.exp(x) + 6
print(x, residual) # residual is approximately 0The residual is the left side minus the right side. A value near zero, up to floating-point rounding, confirms the solution.
Worked example 2: one root is rejected
Solve 4^x - 3·2^x - 4 = 0.
Rewrite 4^x = (2^2)^x = (2^x)^2. Let u = 2^x. Then u^2 - 3u - 4 = 0, which factors as (u - 4)(u + 1) = 0.
u = 4gives2^x = 4, sox = 2.u = -1gives2^x = -1. No realxsatisfies this, because2^x > 0for every realx.
The only solution is x = 2. Check: 4^2 - 3·2^2 - 4 = 16 - 12 - 4 = 0.
Worked example 3: rewriting before substituting
Solve 9^x - 4·3^(x+1) + 27 = 0.
Use 3^(x+1) = 3·3^x and 9^x = (3^x)^2. The equation becomes (3^x)^2 - 12·3^x + 27 = 0. With u = 3^x:
u^2 - 12u + 27 = 0, so (u - 9)(u - 3) = 0, so u = 9 or u = 3.
Then 3^x = 9 gives x = 2, and 3^x = 3 gives x = 1. Check x = 2: 81 - 4·27 + 27 = 0. Check x = 1: 9 - 4·9 + 27 = 0.
The common slip here is forgetting to multiply the coefficient: 4·3^(x+1) is 12·3^x, not 4·3^x.
Worked example 4: negative exponents and the quadratic formula
Solve e^x + e^(-x) = 3.
Let u = e^x, so e^(-x) = 1/u. The equation is u + 1/u = 3. Multiply both sides by u, which is safe because u > 0:
u^2 + 1 = 3u, so u^2 - 3u + 1 = 0.
This does not factor over the integers, so use the quadratic formula:
u = (3 ± √5) / 2.
Both values are positive: about 2.618 and 0.382. So the exact solutions are x = ln((3 + √5)/2) and x = ln((3 - √5)/2), about 0.9624 and -0.9624.
The two solutions are negatives of each other. That makes sense, because the left side e^x + e^(-x) is unchanged when you replace x with -x. The two u values multiply to 1 (the constant term of the quadratic), so they are reciprocals, and their logarithms are opposites.
A reusable solver
Examples 1 to 4 all reduce to a·u^2 + b·u + c = 0 with u = base^x. This function handles that shape and applies the positivity filter automatically.
import math
def solve_quadratic_in_exp(a, b, c, base=math.e):
"""Solve a*base**(2x) + b*base**x + c = 0 over the reals."""
if base <= 0 or base == 1:
raise ValueError("base must be positive and not 1")
disc = b * b - 4 * a * c
if disc < 0:
return [] # no real u, so no real x
root = math.sqrt(disc)
us = {(-b + root) / (2 * a), (-b - root) / (2 * a)}
return sorted(math.log(u) / math.log(base) for u in us if u > 0)
print(solve_quadratic_in_exp(1, -5, 6)) # [0.693..., 1.098...]
print(solve_quadratic_in_exp(1, -3, -4, base=2)) # [2.0]
print(solve_quadratic_in_exp(1, -3, 1)) # [-0.962..., 0.962...]
print(solve_quadratic_in_exp(1, 2, 5)) # []The last call is e^(2x) + 2e^x + 5 = 0. Its discriminant is 4 - 20 < 0, so there is no real u and no real x.
Edge cases
- Repeated root. If the discriminant is zero, you get one
uand onex. For example,e^(2x) - 2e^x + 1 = 0gives(u - 1)^2 = 0, sou = 1andx = 0. - Both roots rejected. If both
uvalues are zero or negative, the equation has no real solution. For example,e^(2x) + 3e^x + 2 = 0givesu = -1oru = -2. - A root of exactly zero.
u = 0is rejected, sinceb^xnever equals 0. This occurs when the constant term is missing, as ine^(2x) - 4e^x = 0. Factor oute^xto gete^x(e^x - 4) = 0. Onlye^x = 4works, sox = ln 4. - Different bases. If the equation mixes bases that are not powers of a common base, such as
2^xand3^x, this substitution does not apply.
Quadratic form in logarithmic equations
The same idea works when the unknown sits inside a logarithm. Solve (ln x)^2 - ln x - 2 = 0.
Let t = ln x. Then t^2 - t - 2 = 0, so (t - 2)(t + 1) = 0, so t = 2 or t = -1. Back-substituting gives x = e^2 and x = e^(-1). Here no root of t is rejected, because ln x can be any real number. The only requirement is x > 0, and e^t is always positive, so both solutions are valid.
Compare the two cases. For u = e^x, the substitution variable is restricted to positive values. For t = ln x, the substitution variable is unrestricted, but x is restricted. The domain restriction moves to a different place, so always ask which variable the restriction applies to.
Common errors
- Stopping at
u. The quadratic's roots are not the answer. You must convert back tox. - Misreading powers.
(e^x)^2 = e^(2x), which is note^(x^2). Only the first form gives a quadratic inu. - Taking a log of a sum.
ln(e^(2x) - 5e^x)does not simplify to2x - 5x. Substitute first. - Dropping the check. Positive roots rarely fail, but a mistaken rewrite will. Plug each answer into the original equation.
- Rounding too early. Keep
ln 2andln 3exact until the final step, then give a decimal approximation.
Exercise
Solve 25^x - 6·5^x + 5 = 0. Give exact answers.
Show answer
Write 25^x = (5^x)^2 and let u = 5^x. Then u^2 - 6u + 5 = 0, so (u - 1)(u - 5) = 0 and u = 1 or u = 5. Both are positive. 5^x = 1 gives x = 0, and 5^x = 5 gives x = 1. Check x = 1: 25 - 30 + 5 = 0.
Exercise
Solve e^(2x) + 3e^x + 2 = 0 over the real numbers, and explain your result.
Show answer
Let u = e^x. Then u^2 + 3u + 2 = 0, so (u + 1)(u + 2) = 0 and u = -1 or u = -2. Since e^x > 0 for every real x, neither value can equal e^x. The equation has no real solution. Also, every term on the left is positive, so the sum cannot be 0.
Exercise
Solve (ln x)^2 - 3 ln x + 2 = 0. Give exact answers.
Show answer
Let t = ln x. Then t^2 - 3t + 2 = 0, so (t - 1)(t - 2) = 0 and t = 1 or t = 2. Therefore x = e or x = e^2. Both are positive, so both are in the domain of ln x.