Logs & Complex Numbers

Study Sheet

Logs & Complex Numbers

Change of base, De Moivre, roots of unity

Two Powerful Toolkits

Tip
Change of base — and telescoping logs

log⁡ab=ln⁡bln⁡a\log_a b = \dfrac{\ln b}{\ln a}, so products of logarithms telescope: log⁡ab⋅log⁡bc=log⁡ac\log_a b \cdot \log_b c = \log_a c.

In plain terms. Rewrite every log over one base and watch middle terms cancel.

Example. log⁡23⋅log⁡34=log⁡24=2\log_2 3 \cdot \log_3 4 = \log_2 4 = 2.

Concept
De Moivre's theorem
45°45°zz² = i
Squaring z=cos⁡45∘+isin⁡45∘z = \cos45^\circ + i\sin45^\circ doubles its angle: z2z^2 lands at 90∘90^\circ, which is ii.

(cos⁡θ+isin⁡θ)n=cos⁡nθ+isin⁡nθ(\cos\theta + i\sin\theta)^n = \cos n\theta + i\sin n\theta — powers of a unit complex number just multiply the angle.

In plain terms. Raising to a power spins the point around the unit circle nn times as fast.

Example. (cos⁡45∘+isin⁡45∘)2=cos⁡90∘+isin⁡90∘=i(\cos 45^\circ + i\sin 45^\circ)^2 = \cos 90^\circ + i \sin 90^\circ = i.

Why it works. Multiplying two unit complex numbers adds their angles (expand (cos⁡α+isin⁡α)(cos⁡β+isin⁡β)(\cos\alpha + i\sin\alpha)(\cos\beta + i\sin\beta) and the addition formulas appear). A power is repeated multiplication by the same number, so the angle is added nn times.

Tip
Roots of unity sum to zero

The nn solutions of zn=1z^n = 1 are evenly spaced on the unit circle, and their sum is 00 for n≥2n \ge 2.

In plain terms. Evenly spread arrows around a circle cancel out.

Example. For cube roots of unity: 1+ω+ω2=01 + \omega + \omega^2 = 0, which is why ω+ω2=−1\omega + \omega^2 = -1.

Example
Worked: a chain of logs

If log⁡ab=2\log_a b = 2 and log⁡bc=3\log_b c = 3, find log⁡ca\log_c a.

Spotting it. Chained logs multiply: log⁡ab⋅log⁡bc=log⁡ac\log_a b \cdot \log_b c = \log_a c, and flipping a log inverts it.

Step 1. log⁡ac=2⋅3=6\log_a c = 2 \cdot 3 = 6.

Step 2. log⁡ca=1log⁡ac=16\log_c a = \dfrac{1}{\log_a c} = \dfrac16. Check with numbers: a=2a = 2, b=4b = 4, c=64c = 64 satisfy the conditions, and 641/6=264^{1/6} = 2 ✓

Example
Worked: when does a power return to 1?
1zz²z³
Powers of zz step around the circle 40∘40^\circ at a time and return to 1 after nine steps.

Let z=cos⁡40∘+isin⁡40∘z = \cos40^\circ + i\sin40^\circ. What is the least positive integer nn with zn=1z^n = 1?

Spotting it. By de Moivre, znz^n has angle 40n∘40n^\circ, and it equals 11 exactly when that angle is a multiple of 360∘360^\circ.

Step 1. 40n40n must be a multiple of 360360, i.e. 9∣n9 \mid n (divide by 4040: nn must be a multiple of 360gcd⁡(40,360)=9\tfrac{360}{\gcd(40, 360)} = 9).

Step 2. The least such nn is 99. The powers z0,z1,…,z8z^0, z^1, \dots, z^8 are the nine vertices of a regular 99-gon: zz is a PRIMITIVE ninth root of unity.

Side note
Where it goes wrong

Reading 40n≡0(mod360)40n \equiv 0 \pmod{360} as "n=360/40n = 360/40" without checking that the division is exact. For an angle of 150∘150^\circ the least nn is not 360150\tfrac{360}{150} but 360gcd⁡(150,360)=36030=12\tfrac{360}{\gcd(150, 360)} = \tfrac{360}{30} = 12: the powers must go round the circle a whole number of times, and 150∘⋅12=1800∘150^\circ \cdot 12 = 1800^\circ is five full turns.

Try it
Try it: an order

Let w=cos⁡100∘+isin⁡100∘w = \cos 100^\circ + i\sin100^\circ. What is the least positive nn with wn=1w^n = 1?

Show the answer

Need 100n100n to be a multiple of 360360. gcd⁡(100,360)=20\gcd(100, 360) = 20, so nn must be a multiple of 36020=18\tfrac{360}{20} = 18. The least is n=18n = 18 (eighteen steps of 100∘100^\circ make 1800∘1800^\circ, five full turns).

Logarithm Problems That Look Impossible

Tip
Change of base and the reciprocal identity

log⁡ba=ln⁡aln⁡b=1log⁡ab\log_b a = \dfrac{\ln a}{\ln b} = \dfrac{1}{\log_a b}, and log⁡ba⋅log⁡cb=log⁡ca\log_b a \cdot \log_c b = \log_c a.

Chaining bases telescopes: log⁡23⋅log⁡34⋅log⁡45⋯log⁡6364=log⁡264=6\log_2 3 \cdot \log_3 4 \cdot \log_4 5 \cdots \log_{63}64 = \log_2 64 = 6. Rewriting everything in one base is the safe default, but spotting the chain first saves the arithmetic entirely.

Tip
The alog⁡ax=xa^{\log_a x} = x family

alog⁡ax=xa^{\log_a x} = x, log⁡a(ax)=x\log_a(a^x) = x, and xlog⁡ay=ylog⁡axx^{\log_a y} = y^{\log_a x}.

The last identity is the one contests hide: taking log⁡a\log_a of both sides turns each into log⁡axlog⁡ay\log_a x\log_a y. It cracks equations like xlog⁡3x=x781x^{\log_3 x} = \tfrac{x^7}{81}, where taking log⁡3\log_3 gives a quadratic in log⁡3x\log_3 x — the standard move whenever the unknown appears in both the base and the exponent.

Example
Worked: a log equation

Solve log⁡2x+log⁡4x=6\log_2 x + \log_4 x = 6.

Step 1 — one base: log⁡4x=log⁡2x2\log_4 x = \dfrac{\log_2 x}{2}.

Step 2 — the equation becomes log⁡2x+12log⁡2x=32log⁡2x=6\log_2 x + \tfrac12\log_2 x = \tfrac32\log_2 x = 6, so log⁡2x=4\log_2 x = 4.

Step 3 — x=16x = 16. Check: log⁡216=4\log_2 16 = 4 and log⁡416=2\log_4 16 = 2, and 4+2=64 + 2 = 6 ✓

Example
Worked: the unknown in base and exponent

Find the product of all positive real solutions of xlog⁡3x=x781x^{\log_3 x} = \dfrac{x^7}{81}.

Spotting it. The unknown is both a base and (inside a log) an exponent. Taking log⁡3\log_3 of both sides turns every piece into a multiple of t=log⁡3xt = \log_3 x.

Step 1. log⁡3(xlog⁡3x)=(log⁡3x)2=t2\log_3\left(x^{\log_3 x}\right) = (\log_3 x)^2 = t^2 and log⁡3x781=7t−4\log_3\dfrac{x^7}{81} = 7t - 4.

Step 2. t2−7t+4=0t^2 - 7t + 4 = 0 has two real roots (discriminant 49−16=33>049 - 16 = 33 > 0) with SUM 77.

Step 3. The solutions are x=3t1x = 3^{t_1} and x=3t2x = 3^{t_2}, with product 3t1+t2=37=21873^{t_1 + t_2} = 3^7 = 2187. The roots themselves, 7±332\tfrac{7 \pm \sqrt{33}}{2}, were never needed.

Side note
Where it goes wrong

Inventing log rules. log⁡(a+b)\log(a + b) is NOT log⁡a+log⁡b\log a + \log b, and (log⁡3x)2(\log_3 x)^2 is not log⁡3(x2)=2log⁡3x\log_3(x^2) = 2\log_3 x. In the worked example, confusing the two turns t2t^2 into 2t2t and produces a linear equation with the wrong single answer. The only moves are the product, quotient and power rules and change of base.

Reminder — Logarithm rules:  log⁡b(xy)=log⁡bx+log⁡by,log⁡b ⁣xy=log⁡bx−log⁡by,log⁡b(xn)=nlog⁡bx\log_b(xy)=\log_b x+\log_b y,\quad \log_b\!\frac{x}{y}=\log_b x-\log_b y,\quad \log_b(x^{n})=n\log_b x
Try it
Try it: a telescoping product

Compute log⁡23⋅log⁡34⋅log⁡45⋅log⁡56⋅log⁡67⋅log⁡78\log_2 3 \cdot \log_3 4 \cdot \log_4 5 \cdot \log_5 6 \cdot \log_6 7 \cdot \log_7 8.

Show the answer

Everything cancels to log⁡28=3\log_2 8 = 3.

Roots of Unity at Work

Tip
Two facts do almost everything

If ω=e2πi/n\omega = e^{2\pi i/n}, then (1) 1+ω+ω2+⋯+ωn−1=01 + \omega + \omega^2 + \cdots + \omega^{n-1} = 0, and (2) xn−1=(x−1)(x−ω)(x−ω2)⋯(x−ωn−1)x^n - 1 = (x - 1)(x - \omega)(x - \omega^2)\cdots(x - \omega^{n-1}), so ∏k=1n−1(x−ωk)=1+x+⋯+xn−1\displaystyle\prod_{k=1}^{n-1}(x - \omega^k) = 1 + x + \cdots + x^{n-1}.

Why they hold. The ωk\omega^k are nn different roots of xn−1x^n - 1, a monic polynomial of degree nn, so it factors completely over them; that is (2). Comparing the xn−1x^{n-1} coefficients (Vieta) gives (1): the roots sum to minus the coefficient of xn−1x^{n-1} in xn−1x^n - 1, which is 00. Dividing (2) by x−1x - 1 leaves the geometric sum. Taking real parts of (1) turns it into facts about cosines; plugging numbers into (2) gives products.

Example
Worked: a cosine sum
0123456
Vertex kk is ωk\omega^k. The seven roots balance around 0: their real parts (dashed drops to the axis) add to zero.

Evaluate cos⁡2π7+cos⁡4π7+cos⁡6π7\cos\dfrac{2\pi}{7} + \cos\dfrac{4\pi}{7} + \cos\dfrac{6\pi}{7}.

Spotting it. Three cosines of multiples of 2π7\tfrac{2\pi}{7}: these are real parts of seventh roots of unity, whose sum is 00.

Step 1. Real parts of 1+ω+⋯+ω6=01 + \omega + \cdots + \omega^6 = 0: 1+∑k=16cos⁡2πk7=01 + \sum_{k=1}^{6}\cos\tfrac{2\pi k}{7} = 0.

Step 2. ω7−k\omega^{7-k} is the conjugate of ωk\omega^k, so cos⁡2π(7−k)7=cos⁡2πk7\cos\tfrac{2\pi(7-k)}{7} = \cos\tfrac{2\pi k}{7}: the six cosines are the three in the problem, each twice.

Step 3. 1+2S=01 + 2S = 0, so S=−12S = -\tfrac12.

Example
Worked: a product over the roots

Let ω=e2πi/5\omega = e^{2\pi i/5}. Compute (2−ω)(2−ω2)(2−ω3)(2−ω4)(2 - \omega)(2 - \omega^2)(2 - \omega^3)(2 - \omega^4).

Spotting it. A product of (x−ωk)(x - \omega^k) over all the non-real roots is fact (2) evaluated at a number.

Step 1. ∏k=14(x−ωk)=1+x+x2+x3+x4\prod_{k=1}^{4}(x - \omega^k) = 1 + x + x^2 + x^3 + x^4.

Step 2. At x=2x = 2: 1+2+4+8+16=311 + 2 + 4 + 8 + 16 = 31. (Equivalently 25−12−1\tfrac{2^5 - 1}{2 - 1}.)

Side note
Where it goes wrong

Losing the root 11. The sum over ALL nnth roots of unity is 00, so the sum over the roots OTHER than 11 is −1-1. In the cosine example, forgetting the 11 gives "2S=02S = 0" and the wrong answer 00. Likewise ∏k=0n−1(x−ωk)=xn−1\prod_{k=0}^{n-1}(x - \omega^k) = x^n - 1 includes the factor x−1x - 1; the product from k=1k = 1 does not.

Try it
Try it: a power of 1+ω1 + \omega

Let ω=e2πi/3\omega = e^{2\pi i/3}. Compute (1+ω)2025(1 + \omega)^{2025}.

Show the answer

From 1+ω+ω2=01 + \omega + \omega^2 = 0, 1+ω=−ω21 + \omega = -\omega^2. So (1+ω)2025=−ω4050(1 + \omega)^{2025} = -\omega^{4050}, and since ω3=1\omega^3 = 1 and 4050=3⋅13504050 = 3 \cdot 1350, this is −1-1.