Math Core

Module 1.3 · Algebra

Logarithms and exponentials

Logarithm problems on the AIME look intimidating, with nested logs, mixed bases and systems of three equations, but they almost always collapse to ordinary algebra. The trick is to pick the right substitution: convert everything to one base, then let the logarithms themselves be your variables.

The rules, and why they work

log⁡bx=y\log_b x = y means exactly by=xb^y = x (with b>0b > 0, b≠1b \ne 1, x>0x > 0). Every log rule is an exponent rule in disguise:

Log ruleExponent rule behind it
log⁡b(xy)=log⁡bx+log⁡by\log_b(xy) = \log_b x + \log_b ybmbn=bm+nb^m b^n = b^{m+n}
log⁡b ⁣(xy)=log⁡bx−log⁡by\log_b\!\left(\dfrac{x}{y}\right) = \log_b x - \log_b ybmbn=bm−n\dfrac{b^m}{b^n} = b^{m-n}
log⁡b(xk)=klog⁡bx\log_b(x^k) = k\log_b x(bm)k=bmk(b^m)^k = b^{mk}
log⁡bkx=1klog⁡bx\log_{b^k} x = \dfrac1k\log_b x(bk)m/k=bm(b^k)^{m/k} = b^m

Change of base

For any valid base cc,

log⁡ba=log⁡calog⁡cb.\log_b a = \frac{\log_c a}{\log_c b}.

Consequences: log⁡ba=1log⁡ab\log_b a = \dfrac{1}{\log_a b}, and logs chain like fractions:

log⁡ab⋅log⁡bc⋅log⁡cd=log⁡ad.\log_a b \cdot \log_b c \cdot \log_c d = \log_a d.

The chain rule is easiest to see with change of base: log⁡blog⁡a⋅log⁡clog⁡b⋅log⁡dlog⁡c=log⁡dlog⁡a\dfrac{\log b}{\log a} \cdot \dfrac{\log c}{\log b} \cdot \dfrac{\log d}{\log c} = \dfrac{\log d}{\log a}. Every middle term cancels, so long products of logs telescope.

One more identity comes up often: alog⁡bc=clog⁡baa^{\log_b c} = c^{\log_b a}. Take log⁡b\log_b of both sides and both become log⁡ba⋅log⁡bc\log_b a \cdot \log_b c.

Strategy: make the logs the variables

  1. Pick one base (usually the smallest one in sight, like 22) and rewrite every log in that base.
  2. Substitute u=log⁡2xu = \log_2 x, v=log⁡2yv = \log_2 y, and so on. Products and powers of x,yx, y become sums and multiples of u,vu, v.
  3. Solve the algebra (often linear or quadratic) and convert back with x=2ux = 2^u.

Exponential equations work the same way in reverse: in 4x−3⋅2x+1+8=04^x - 3 \cdot 2^{x+1} + 8 = 0, let u=2xu = 2^x, so 4x=u24^x = u^2 and 2x+1=2u2^{x+1} = 2u.

Common mistake

Check every solution in the original equation. Logs need positive arguments and bases that are positive and not 11. Squaring or combining log⁡bx+log⁡b(x−12)\log_b x + \log_b(x - 12) into log⁡b(x(x−12))\log_b\big(x(x - 12)\big) can create extraneous roots where xx or x−12x - 12 is negative.

Worked examples

Worked example: Mixed bases

Solve log⁡2x+log⁡4x+log⁡8x=11\log_2 x + \log_4 x + \log_8 x = 11.

Since log⁡4x=12log⁡2x\log_4 x = \dfrac12\log_2 x and log⁡8x=13log⁡2x\log_8 x = \dfrac13\log_2 x, the equation is (1+12+13)log⁡2x=11\left(1 + \dfrac12 + \dfrac13\right)\log_2 x = 11, or 116log⁡2x=11\dfrac{11}{6}\log_2 x = 11. So log⁡2x=6\log_2 x = 6 and x=64x = 64.

Worked example: A hidden quadratic

Find all real xx with 4x−3⋅2x+1+8=04^x - 3 \cdot 2^{x+1} + 8 = 0.

Let u=2x>0u = 2^x > 0. Then u2−6u+8=0u^2 - 6u + 8 = 0, so u=2u = 2 or u=4u = 4, giving x=1x = 1 or x=2x = 2. Both uu values are positive, so both solutions are valid.

Worked example: A system

Positive reals x,yx, y satisfy log⁡2x+log⁡4y=4\log_2 x + \log_4 y = 4 and log⁡4x+log⁡2y=5\log_4 x + \log_2 y = 5. Find xyxy.

Let a=log⁡2xa = \log_2 x and b=log⁡2yb = \log_2 y. The system is a+b2=4a + \dfrac b2 = 4 and a2+b=5\dfrac a2 + b = 5. Adding gives 32(a+b)=9\dfrac32(a + b) = 9, so a+b=6a + b = 6 and xy=2a+b=64xy = 2^{a+b} = 64. (In fact a=2a = 2 and b=4b = 4, so x=4x = 4 and y=16y = 16.)

You didn't even need aa and bb separately. Look for the combination the question asks for.

Worked example: Floors of logs

Compute ∑k=131⌊log⁡2k⌋\displaystyle\sum_{k=1}^{31}\lfloor\log_2 k\rfloor.

⌊log⁡2k⌋=j\lfloor\log_2 k\rfloor = j exactly when 2j≤k<2j+12^j \le k < 2^{j+1}, which happens for 2j2^j values of kk. From 11 to 3131 the blocks are complete:

0⋅1+1⋅2+2⋅4+3⋅8+4⋅16=0+2+8+24+64=98.0 \cdot 1 + 1 \cdot 2 + 2 \cdot 4 + 3 \cdot 8 + 4 \cdot 16 = 0 + 2 + 8 + 24 + 64 = 98.

Tip

When a problem gives several log equations with the same three variables, taking log⁡\log of everything usually turns it into a linear system in log⁡x,log⁡y,log⁡z\log x, \log y, \log z. Add all the equations first. The total is often exactly what you need.

Practice

Practice 1

Find the positive real number xx such that log⁡3x+log⁡3x+log⁡1/3x=6\log_3 x + \log_{\sqrt3} x + \log_{1/3} x = 6.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

Find the positive integer nn such that

log⁡23⋅log⁡34⋅log⁡45⋯log⁡n(n+1)=9.\log_2 3 \cdot \log_3 4 \cdot \log_4 5 \cdots \log_n(n + 1) = 9.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

Find the real number xx such that log⁡2(log⁡4x)+log⁡4(log⁡2x)=2\log_2(\log_4 x) + \log_4(\log_2 x) = 2.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

Positive real numbers x<yx < y satisfy log⁡xy+log⁡yx=103\log_x y + \log_y x = \dfrac{10}{3} and xy=256xy = 256. Find x+yx + y.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

Real numbers a,b,ca, b, c greater than 11 satisfy log⁡ab=2\log_a b = 2, log⁡bc=3\log_b c = 3 and abc=512abc = 512. Find a+b+ca + b + c.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

The sum of all positive real numbers xx satisfying xlog⁡2x=64x5x^{\log_2 x} = 64x^5 is mn\dfrac mn, where mm and nn are relatively prime positive integers. Find m+nm + n.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

Positive real numbers x,y,zx, y, z, none equal to 11, satisfy

log⁡x(yz)=2andlog⁡y(zx)=3.\log_x(yz) = 2 \qquad \text{and} \qquad \log_y(zx) = 3.

Then log⁡z(xy)=mn\log_z(xy) = \dfrac mn, where mm and nn are relatively prime positive integers. Find m+nm + n.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

Compute ∑k=1100⌊log⁡2k⌋\displaystyle\sum_{k=1}^{100}\lfloor\log_2 k\rfloor.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 9

Find the number of ordered pairs (a,b)(a, b) of integers with 2≤a≤1002 \le a \le 100 and 2≤b≤1002 \le b \le 100 such that log⁡ab\log_a b is a rational number.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Real contest practice

  • 2024 AIME I, Problem 2: two equal log expressions in different bases, solved with the reciprocal rule log⁡xy⋅log⁡yx=1\log_x y \cdot \log_y x = 1.
  • 2024 AIME II, Problem 4: a system of three log equations that becomes linear in log⁡2x,log⁡2y,log⁡2z\log_2 x, \log_2 y, \log_2 z.