Skip to content

Algebraic Manipulations and Factoring Tricks

Pillar: SHAPE — "Reshape an expression to reveal hidden structure."


Why Manipulations Matter

Many competition problems look impossible until you rewrite the expression in just the right way. A messy equation becomes a clean product. A sum with 100 terms collapses to 2. An equation in two variables factors into a single constraint on integers.

This lesson is about building a toolbox of reshaping moves. Each identity or trick is a lens that reveals structure you couldn't see before.


Factoring Identities

These are the building blocks. Memorize them — you will use them constantly.

Difference and Sum of Powers

Identity Formula
Difference of squares \(a^2 - b^2 = (a-b)(a+b)\)
Difference of cubes \(a^3 - b^3 = (a-b)(a^2 + ab + b^2)\)
Sum of cubes \(a^3 + b^3 = (a+b)(a^2 - ab + b^2)\)
General difference \(a^n - b^n = (a-b)(a^{n-1} + a^{n-2}b + \cdots + b^{n-1})\)

Binomial Powers

Identity Formula
Square of a sum \((a+b)^2 = a^2 + 2ab + b^2\)
Square of a difference \((a-b)^2 = a^2 - 2ab + b^2\)
Cube of a sum \((a+b)^3 = a^3 + 3a^2b + 3ab^2 + b^3\)
Cube of a difference \((a-b)^3 = a^3 - 3a^2b + 3ab^2 - b^3\)

The Key Insight

Every identity is reversible. Expanding turns a product into a sum. Factoring turns a sum into a product. The skill is recognizing which direction helps.

Example. Simplify \(x^6 - 1\).

First apply difference of squares:

\[x^6 - 1 = (x^3)^2 - 1^2 = (x^3 - 1)(x^3 + 1)\]

Then factor each cubic:

\[= (x-1)(x^2+x+1)(x+1)(x^2-x+1)\]

We went from one opaque expression to four simpler factors. That's the power of SHAPE.


Rationalizing Denominators

When a denominator contains a square root, multiply top and bottom by the conjugate to eliminate it.

Single Radical

\[\frac{5}{\sqrt{3}} = \frac{5}{\sqrt{3}} \cdot \frac{\sqrt{3}}{\sqrt{3}} = \frac{5\sqrt{3}}{3}\]

Binomial with Radical

\[\frac{1}{3 + \sqrt{2}} = \frac{1}{3 + \sqrt{2}} \cdot \frac{3 - \sqrt{2}}{3 - \sqrt{2}} = \frac{3 - \sqrt{2}}{9 - 2} = \frac{3 - \sqrt{2}}{7}\]

The trick works because \((a + \sqrt{b})(a - \sqrt{b}) = a^2 - b\), which is our old friend difference of squares.

Nested Radicals

Sometimes you need to rationalize twice:

\[\frac{1}{\sqrt{3} + \sqrt{2}} = \frac{\sqrt{3} - \sqrt{2}}{(\sqrt{3})^2 - (\sqrt{2})^2} = \frac{\sqrt{3} - \sqrt{2}}{1} = \sqrt{3} - \sqrt{2}\]

This is how you can telescope a sum like \(\sum_{k=1}^{99} \frac{1}{\sqrt{k} + \sqrt{k+1}}\). Each term rationalizes to \(\sqrt{k+1} - \sqrt{k}\), and the sum collapses to \(\sqrt{100} - \sqrt{1} = 9\).


Simon's Favorite Factoring Trick (SFFT)

This is one of the most powerful techniques in competition math. The idea: when you have an expression like \(xy + ax + by\), you can add a constant to both sides to make the left side factor.

The Pattern

\[xy + ax + by + ab = (x + b)(y + a)\]

So if you have:

\[xy + ax + by = c\]

Add \(ab\) to both sides:

\[xy + ax + by + ab = c + ab\]
\[(x + b)(y + a) = c + ab\]

Now it's a factoring problem: find all factor pairs of the right side.

Worked Example

Problem. Find all pairs of positive integers \((x, y)\) such that \(xy + 3x + 2y = 22\).

Step 1. Identify the SFFT form. We have \(xy + 3x + 2y\), which matches \(xy + ax + by\) with \(a = 3\), \(b = 2\).

Step 2. Add \(ab = 6\) to both sides:

\[xy + 3x + 2y + 6 = 28\]
\[(x + 2)(y + 3) = 28\]

Step 3. List factor pairs of 28: \((1, 28), (2, 14), (4, 7), (7, 4), (14, 2), (28, 1)\).

Step 4. Since \(x + 2 \ge 3\) and \(y + 3 \ge 4\) (positive integers), the valid pairs are:

\(x + 2\) \(y + 3\) \(x\) \(y\)
4 7 2 4
7 4 5 1
14 2 12 — (negative, skip)
28 1 26 — (negative, skip)

Wait — \(y + 3 = 2 \Rightarrow y = -1\) which is not positive, and \(y + 3 = 1 \Rightarrow y = -2\) same issue. So the answer is \((x, y) \in \{(2, 4), (5, 1)\}\).

When to Suspect SFFT

  • The equation has an \(xy\) term mixed with linear terms in \(x\) and \(y\).
  • You're asked to find integer solutions (because the trick converts the problem to listing divisors).
  • The equation "almost" factors but has a constant off.

Telescoping Sums and Products

A telescoping sum is one where consecutive terms cancel, leaving only the first and last terms.

Telescoping Sums

The classic form:

\[\sum_{k=1}^{n} \big(f(k) - f(k+1)\big) = f(1) - f(n+1)\]

Write out the terms and watch them cancel:

\[\big(f(1) - f(2)\big) + \big(f(2) - f(3)\big) + \big(f(3) - f(4)\big) + \cdots + \big(f(n) - f(n+1)\big)\]

Every intermediate term appears once with a \(+\) and once with a \(-\). Only \(f(1)\) and \(-f(n+1)\) survive.

Partial Fractions for Telescoping

Many fractions can be decomposed to reveal a telescope.

Example. Compute \(\displaystyle\sum_{k=1}^{100} \frac{1}{k(k+1)}\).

Use partial fractions:

\[\frac{1}{k(k+1)} = \frac{1}{k} - \frac{1}{k+1}\]

So the sum telescopes:

\[\left(\frac{1}{1} - \frac{1}{2}\right) + \left(\frac{1}{2} - \frac{1}{3}\right) + \cdots + \left(\frac{1}{100} - \frac{1}{101}\right) = 1 - \frac{1}{101} = \frac{100}{101}\]

More Partial Fraction Patterns

Expression Decomposition
\(\frac{1}{k(k+1)}\) \(\frac{1}{k} - \frac{1}{k+1}\)
\(\frac{1}{k(k+2)}\) \(\frac{1}{2}\left(\frac{1}{k} - \frac{1}{k+2}\right)\)
\(\frac{1}{k(k+1)(k+2)}\) \(\frac{1}{2}\left(\frac{1}{k(k+1)} - \frac{1}{(k+1)(k+2)}\right)\)

Telescoping Products

Products can telescope too:

\[\prod_{k=2}^{n} \frac{k-1}{k} = \frac{1}{2} \cdot \frac{2}{3} \cdot \frac{3}{4} \cdots \frac{n-1}{n} = \frac{1}{n}\]

Each numerator cancels with the previous denominator.

Example. Compute \(\displaystyle\prod_{k=2}^{n} \left(1 - \frac{1}{k^2}\right)\).

Factor each term: \(1 - \frac{1}{k^2} = \frac{k^2 - 1}{k^2} = \frac{(k-1)(k+1)}{k \cdot k}\).

\[\prod_{k=2}^{n} \frac{(k-1)(k+1)}{k^2} = \frac{1 \cdot 3}{2 \cdot 2} \cdot \frac{2 \cdot 4}{3 \cdot 3} \cdot \frac{3 \cdot 5}{4 \cdot 4} \cdots \frac{(n-1)(n+1)}{n \cdot n}\]

The numerators telescope in two chains: \(1 \cdot 2 \cdot 3 \cdots (n-1)\) and \(3 \cdot 4 \cdot 5 \cdots (n+1)\). After cancellation:

\[= \frac{n+1}{2n}\]

Clever Substitutions

When an expression involves symmetric combinations of a variable, substitution can dramatically simplify things.

The \(s = x + \frac{1}{x}\) Trick

If you know \(x + \frac{1}{x} = s\), you can find any symmetric power:

\[x^2 + \frac{1}{x^2} = s^2 - 2\]
\[x^3 + \frac{1}{x^3} = s^3 - 3s\]
\[x^4 + \frac{1}{x^4} = \left(x^2 + \frac{1}{x^2}\right)^2 - 2 = (s^2 - 2)^2 - 2 = s^4 - 4s^2 + 2\]

Example. Given \(x + \frac{1}{x} = 7\), find \(x^3 + \frac{1}{x^3}\).

\[x^3 + \frac{1}{x^3} = 7^3 - 3 \cdot 7 = 343 - 21 = 322\]

Symmetric Substitutions

For expressions symmetric in \(a\) and \(b\), let \(s = a + b\) and \(p = ab\). Then:

  • \(a^2 + b^2 = s^2 - 2p\)
  • \(a^3 + b^3 = s^3 - 3sp\)
  • \(a^2 b + ab^2 = sp\)
  • \((a - b)^2 = s^2 - 4p\)

This connects directly to Vieta's formulas — if \(a, b\) are roots of \(x^2 - sx + p = 0\), then \(s\) and \(p\) are the sum and product of roots.

Homogeneous Substitution

If every term in an equation has the same total degree, divide through by one variable to reduce the number of unknowns.

Example. Solve \(x^2 + 3xy + 2y^2 = 0\) for \(x/y\).

Divide by \(y^2\): \(\left(\frac{x}{y}\right)^2 + 3\left(\frac{x}{y}\right) + 2 = 0\).

Let \(t = x/y\): \(t^2 + 3t + 2 = (t+1)(t+2) = 0\), so \(t = -1\) or \(t = -2\).


Practice Problems

Problem 1. Factor completely: \(x^4 - 16\).

Solution
\[x^4 - 16 = (x^2)^2 - 4^2 = (x^2 - 4)(x^2 + 4) = (x-2)(x+2)(x^2+4)\]

Problem 2. Compute \(\displaystyle\sum_{k=1}^{50} \frac{1}{k(k+1)}\).

Solution

By partial fractions: \(\frac{1}{k(k+1)} = \frac{1}{k} - \frac{1}{k+1}\).

The sum telescopes to \(1 - \frac{1}{51} = \frac{50}{51}\).

Problem 3. Find all positive integer solutions to \(xy - 2x + 3y = 25\).

Solution

Rearrange for SFFT: \(xy - 2x + 3y = 25\).

Here \(a = -2\), \(b = 3\), so \(ab = -6\). Add \(-6\) to both sides:

\[xy - 2x + 3y - 6 = 19\]
\[(x + 3)(y - 2) = 19\]

Since 19 is prime, the factor pairs are \((1, 19)\) and \((19, 1)\).

  • \(x + 3 = 1 \Rightarrow x = -2\) (not positive, skip)
  • \(x + 3 = 19 \Rightarrow x = 16\), \(y - 2 = 1 \Rightarrow y = 3\)

The only solution is \((x, y) = (16, 3)\).

Problem 4. Given \(x + \frac{1}{x} = 4\), find \(x^4 + \frac{1}{x^4}\).

Solution

Let \(s = x + \frac{1}{x} = 4\).

\(x^2 + \frac{1}{x^2} = s^2 - 2 = 16 - 2 = 14\)

\(x^4 + \frac{1}{x^4} = 14^2 - 2 = 196 - 2 = 194\)

Problem 5. Simplify \(\displaystyle\prod_{k=2}^{10} \left(1 - \frac{1}{k^2}\right)\).

Solution

Using our formula: \(\displaystyle\prod_{k=2}^{n} \left(1 - \frac{1}{k^2}\right) = \frac{n+1}{2n}\).

For \(n = 10\): \(\frac{11}{20}\).

Problem 6. Rationalize and simplify: \(\displaystyle\sum_{k=1}^{99} \frac{1}{\sqrt{k+1} + \sqrt{k}}\).

Solution

Multiply each term by \(\frac{\sqrt{k+1} - \sqrt{k}}{\sqrt{k+1} - \sqrt{k}}\):

\[\frac{\sqrt{k+1} - \sqrt{k}}{(k+1) - k} = \sqrt{k+1} - \sqrt{k}\]

The sum telescopes: \(\sqrt{100} - \sqrt{1} = 10 - 1 = 9\).