Algebraic Weapons

Study Sheet

Algebraic Weapons

Factorizations and substitutions that crack hard problems

Identities That Do the Work

Tip
Difference of squares, everywhere

a2−b2=(a−b)(a+b)a^2 - b^2 = (a - b)(a + b) — the most-used identity in competition algebra.

In plain terms. A difference of two squares always splits into a product, often collapsing huge arithmetic.

Example. 512−492=(51−49)(51+49)=2⋅100=20051^2 - 49^2 = (51 - 49)(51 + 49) = 2 \cdot 100 = 200 — no squaring needed.

Concept
Symmetric sums via Vieta

By Vieta's formulas, everything symmetric in two roots can be written using x+yx + y and xyxy: for instance x2+y2=(x+y)2−2xyx^2 + y^2 = (x+y)^2 - 2xy.

In plain terms. You rarely need the roots themselves — just their sum and product.

Example. If x+y=6x + y = 6 and xy=5xy = 5, then x2+y2=36−10=26x^2 + y^2 = 36 - 10 = 26.

Reminder — Vieta's formulas:  r1+r2=−ba,r1r2=car_1+r_2=-\frac{b}{a},\qquad r_1 r_2=\frac{c}{a}
Tip
The substitution u=x+1xu = x + \tfrac{1}{x}

From u=x+1xu = x + \tfrac1x: x2+1x2=u2−2x^2 + \tfrac{1}{x^2} = u^2 - 2 and x3+1x3=u3−3ux^3 + \tfrac{1}{x^3} = u^3 - 3u.

In plain terms. Expressions built from xx and 1/x1/x collapse into a polynomial in uu.

Example. If x+1x=3x + \tfrac1x = 3, then x2+1x2=9−2=7x^2 + \tfrac{1}{x^2} = 9 - 2 = 7.

Why it works. Square u=x+1xu = x + \tfrac1x: the cross term is 2⋅x⋅1x=22 \cdot x \cdot \tfrac1x = 2, a constant, so u2=x2+1x2+2u^2 = x^2 + \tfrac{1}{x^2} + 2. Cubing works the same way: u3=x3+1x3+3(x+1x)u^3 = x^3 + \tfrac{1}{x^3} + 3\left(x + \tfrac1x\right). Because the products x⋅1xx \cdot \tfrac1x keep collapsing to 11, every expression xn+x−nx^n + x^{-n} is a polynomial in uu. One caution: for real xx, ∣u∣≥2|u| \ge 2, since x2−ux+1=0x^2 - ux + 1 = 0 needs u2≥4u^2 \ge 4.

Example
Worked: a prime factor

What is the largest prime factor of 38−13^8 - 1?

Spotting it. An even power minus 11 is a difference of squares, and it keeps splitting.

Step 1. 38−1=(34−1)(34+1)=80⋅823^8 - 1 = (3^4 - 1)(3^4 + 1) = 80 \cdot 82.

Step 2. 80=24⋅580 = 2^4 \cdot 5 and 82=2⋅4182 = 2 \cdot 41, so 38−1=25⋅5⋅413^8 - 1 = 2^5 \cdot 5 \cdot 41 and the largest prime factor is 4141. Computing 65606560 first and then factoring it is the slow way to the same place.

Example
Worked: climbing the powers

If x+1x=4x + \tfrac1x = 4, find x3+1x3x^3 + \tfrac1{x^3} and x4+1x4x^4 + \tfrac{1}{x^4}.

Spotting it. Everything is symmetric in xx and 1x\tfrac1x, so use u=4u = 4 and the identities; never solve for x=2±3x = 2 \pm \sqrt3.

Step 1. x3+1x3=u3−3u=64−12=52x^3 + \tfrac{1}{x^3} = u^3 - 3u = 64 - 12 = 52.

Step 2. x2+1x2=u2−2=14x^2 + \tfrac{1}{x^2} = u^2 - 2 = 14, and squaring AGAIN, x4+1x4=142−2=194x^4 + \tfrac1{x^4} = 14^2 - 2 = 194.

Example
Worked: a palindromic quartic

Find all real solutions of x4−7x3+14x2−7x+1=0x^4 - 7x^3 + 14x^2 - 7x + 1 = 0.

Spotting it. The coefficients read the same forwards and backwards (1,−7,14,−7,11, -7, 14, -7, 1). That symmetry means dividing by x2x^2 produces x+1xx + \tfrac1x and x2+1x2x^2 + \tfrac1{x^2}.

Step 1. x=0x = 0 is not a root, so divide by x2x^2: (x2+1x2)−7(x+1x)+14=0\left(x^2 + \tfrac1{x^2}\right) - 7\left(x + \tfrac1x\right) + 14 = 0.

Step 2. With u=x+1xu = x + \tfrac1x: (u2−2)−7u+14=0(u^2 - 2) - 7u + 14 = 0, i.e. u2−7u+12=0u^2 - 7u + 12 = 0, so u=3u = 3 or u=4u = 4.

Step 3. u=3u = 3: x2−3x+1=0x^2 - 3x + 1 = 0, so x=3±52x = \tfrac{3 \pm \sqrt5}{2}. u=4u = 4: x2−4x+1=0x^2 - 4x + 1 = 0, so x=2±3x = 2 \pm \sqrt3. All four solutions are real: a quartic became two quadratics.

Side note
Where it goes wrong

Dropping the constant: x2+1x2x^2 + \tfrac1{x^2} is u2−2u^2 - 2, not u2u^2, because squaring x+1xx + \tfrac1x produces the cross term 22. And watch for impossible values: if a problem gives x+1x=1x + \tfrac1x = 1 for real xx, there is no such xx (the equation x2−x+1=0x^2 - x + 1 = 0 has no real roots), which a correct formula will not warn you about.

Try it
Try it: split a big number

What is the largest prime factor of 216−12^{16} - 1?

Show the answer

Split three times: 216−1=(28−1)(28+1)=(24−1)(24+1)(28+1)=15⋅17⋅257=3⋅5⋅17⋅2572^{16} - 1 = (2^8 - 1)(2^8 + 1) = (2^4 - 1)(2^4 + 1)(2^8 + 1) = 15 \cdot 17 \cdot 257 = 3 \cdot 5 \cdot 17 \cdot 257. Since 257257 is prime (no prime up to 257<17\sqrt{257} < 17 divides it), the largest prime factor is 257257.

Inequalities That Decide Problems

Tip
AM–GM and when equality holds

For nonnegative aia_i: a1+⋯+ann≥a1⋯ann\dfrac{a_1+\cdots+a_n}{n} \ge \sqrt[n]{a_1\cdots a_n}, with equality exactly when all aia_i are equal.

The equality case is the useful half. To minimise x+9xx + \dfrac{9}{x} for x>0x > 0: AM–GM gives x+9x≥29=6x + \tfrac9x \ge 2\sqrt9 = 6, attained when x=9xx = \tfrac9x, i.e. x=3x = 3. Any optimisation whose answer "looks symmetric" is usually AM–GM in disguise, and the equality condition tells you where the optimum sits without calculus.

Tip
Cauchy–Schwarz in the useful form

(a12+⋯+an2)(b12+⋯+bn2)≥(a1b1+⋯+anbn)2(a_1^2+\cdots+a_n^2)(b_1^2+\cdots+b_n^2) \ge (a_1b_1+\cdots+a_nb_n)^2.

With bi=1b_i = 1 it gives the power-mean bound n∑ai2≥(∑ai)2n\sum a_i^2 \ge \left(\sum a_i\right)^2, which turns "the sum is fixed" into "the sum of squares is at least this much" — exactly the step needed for extremal problems on contests. Equality needs the vectors proportional, which again names the optimiser.

Example
Worked: a minimum by AM–GM

For x>0x>0, what is the least value of 4x+25x4x + \dfrac{25}{x}, and where is it attained?

Step 1 — AM–GM on the two terms: 4x+25x≥24x⋅25x=2100=204x + \tfrac{25}{x} \ge 2\sqrt{4x\cdot\tfrac{25}{x}} = 2\sqrt{100} = 20.

Step 2 — equality when 4x=25x4x = \tfrac{25}{x}, i.e. x2=254x^2 = \tfrac{25}{4}, x=52x = \tfrac52.

Step 3 — check: 4⋅52+255/2=10+10=204\cdot\tfrac52 + \tfrac{25}{5/2} = 10 + 10 = 20 ✓

Try it
Try it: minimise a sum

For x>0x>0, minimise x+16xx + \dfrac{16}{x}.

Show the answer

≥216=8\ge 2\sqrt{16} = 8, attained at x=4x = 4.

Example
Worked: splitting a term to fix the product
xy12344812162024(2, 12)
y=x2+16/xy = x^2 + 16/x never dips below the dashed line y=12y = 12; it touches it at x=2x = 2.

For x>0x > 0, find the least value of x2+16xx^2 + \dfrac{16}{x}.

Spotting it. AM–GM on the two terms gives 216x2\sqrt{16x}, which still contains xx: useless. Split 16x\tfrac{16}{x} into two equal halves so that the PRODUCT of the three terms is constant.

Step 1. x2+8x+8x≥3x2⋅8x⋅8x3=3643=12x^2 + \tfrac8x + \tfrac8x \ge 3\sqrt[3]{x^2 \cdot \tfrac8x \cdot \tfrac8x} = 3\sqrt[3]{64} = 12.

Step 2. Equality needs x2=8xx^2 = \tfrac8x, i.e. x=2x = 2, and then 4+8=124 + 8 = 12 ✓. The least value is 1212.

How to choose the split. The powers of xx in the pieces must cancel: x2⋅x−1⋅x−1=x0x^2 \cdot x^{-1} \cdot x^{-1} = x^0.

Example
Worked: a fixed sum and a weighted bound

Positive reals xx and yy satisfy x+y=1x + y = 1. Find the least value of 1x+4y\dfrac1x + \dfrac4y.

Spotting it. A sum of fractions against a fixed sum of denominators is Cauchy–Schwarz in the form (a2x+b2y)(x+y)≥(a+b)2\left(\tfrac{a^2}{x} + \tfrac{b^2}{y}\right)(x + y) \ge (a + b)^2.

Step 1. With a=1a = 1, b=2b = 2: (1x+4y)⋅1≥(1+2)2=9\left(\tfrac1x + \tfrac4y\right) \cdot 1 \ge (1 + 2)^2 = 9.

Step 2. Equality needs ax=by\tfrac{a}{x} = \tfrac{b}{y}, so y=2xy = 2x; with x+y=1x + y = 1 that is x=13x = \tfrac13, y=23y = \tfrac23, and indeed 3+6=93 + 6 = 9 ✓. The least value is 99.

Side note
Where it goes wrong

Using an equality case that is not allowed. For x≥3x \ge 3, AM–GM says x+1x≥2x + \tfrac1x \ge 2, but equality needs x=1x = 1, which is outside the range, so 22 is never reached. The function x+1xx + \tfrac1x is increasing for x≥1x \ge 1, so the true minimum is at x=3x = 3: 3+13=1033 + \tfrac13 = \tfrac{10}{3}. Always check that the equality case is actually attainable.

Radicals: Conjugates and Denesting

Tip
Denest m+2n\sqrt{m + 2\sqrt n} and clear radicals with conjugates

If x+y=mx + y = m and xy=nxy = n with x≥y≥0x \ge y \ge 0, then m+2n=x+y\sqrt{m + 2\sqrt n} = \sqrt x + \sqrt y and m−2n=x−y\sqrt{m - 2\sqrt n} = \sqrt x - \sqrt y. To clear a+b\sqrt a + \sqrt b from a denominator, multiply by a−b\sqrt a - \sqrt b.

Why it works. (x+y)2=x+y+2xy(\sqrt x + \sqrt y)^2 = x + y + 2\sqrt{xy}, so a nested radical of the form m+2n\sqrt{m + 2\sqrt n} denests exactly when two numbers have sum mm and product nn, which is a Vieta question. Conjugates work because (a+b)(a−b)=a−b(\sqrt a + \sqrt b)(\sqrt a - \sqrt b) = a - b has no radicals left: a difference of squares again.

Example
Worked: denest a radical

Simplify 11+62\sqrt{11 + 6\sqrt2}.

Spotting it. First make the inner coefficient a 22: 62=2186\sqrt2 = 2\sqrt{18}. Now look for two numbers with sum 1111 and product 1818.

Step 1. 9+2=119 + 2 = 11 and 9⋅2=189 \cdot 2 = 18.

Step 2. So 11+62=9+2=3+2\sqrt{11 + 6\sqrt2} = \sqrt9 + \sqrt2 = 3 + \sqrt2. Check: (3+2)2=9+62+2(3 + \sqrt2)^2 = 9 + 6\sqrt2 + 2 ✓

Example
Worked: a telescoping sum of conjugates

Compute 11+2+12+3+⋯+199+100\dfrac{1}{\sqrt1 + \sqrt2} + \dfrac{1}{\sqrt2 + \sqrt3} + \cdots + \dfrac{1}{\sqrt{99} + \sqrt{100}}.

Spotting it. Each denominator is a sum of square roots of consecutive integers, and its conjugate has product (k+1)−k=1(k + 1) - k = 1.

Step 1. 1k+k+1=k+1−k(k+1)−k=k+1−k\dfrac{1}{\sqrt k + \sqrt{k + 1}} = \dfrac{\sqrt{k + 1} - \sqrt k}{(k + 1) - k} = \sqrt{k + 1} - \sqrt k.

Step 2. The sum telescopes: (2−1)+(3−2)+⋯+(100−99)=100−1=9(\sqrt2 - \sqrt1) + (\sqrt3 - \sqrt2) + \cdots + (\sqrt{100} - \sqrt{99}) = \sqrt{100} - 1 = 9.

Example
Worked: when the 2 is missing

Simplify 5+21\sqrt{5 + \sqrt{21}}.

Spotting it. The inner radical has no factor 22 in front, and 21=221/4\sqrt{21} = 2\sqrt{21/4} leads to fractions with no nice sum-product pair. Multiply inside and outside by 22 instead.

Step 1. 5+21=10+2212\sqrt{5 + \sqrt{21}} = \dfrac{\sqrt{10 + 2\sqrt{21}}}{\sqrt2}.

Step 2. 7+3=107 + 3 = 10 and 7⋅3=217 \cdot 3 = 21, so 10+221=7+3\sqrt{10 + 2\sqrt{21}} = \sqrt7 + \sqrt3.

Step 3. 7+32=14+62\dfrac{\sqrt7 + \sqrt3}{\sqrt2} = \dfrac{\sqrt{14} + \sqrt6}{2}.

Side note
Where it goes wrong

Splitting a root over a sum: a+b≠a+b\sqrt{a + b} \ne \sqrt a + \sqrt b. For instance 9+16=5\sqrt{9 + 16} = 5, not 3+4=73 + 4 = 7. Square roots split over PRODUCTS (ab=ab\sqrt{ab} = \sqrt a\sqrt b for a,b≥0a, b \ge 0), and that is the only reason denesting needs the sum-and-product search at all.

Try it
Try it: denest a difference

Simplify 8−215\sqrt{8 - 2\sqrt{15}}.

Show the answer

Two numbers with sum 88 and product 1515 are 55 and 33, so 8−215=5−3\sqrt{8 - 2\sqrt{15}} = \sqrt5 - \sqrt3 (the larger one first, since a square root is positive). Check: (5−3)2=5−215+3(\sqrt5 - \sqrt3)^2 = 5 - 2\sqrt{15} + 3 ✓