Day 16 — Factoring

Updated

July 30, 2026

Day 16 — Factoring

Stage II · concept day
Goal: Factor by GCF, grouping, trinomial patterns, difference of squares and cubes; use the factor theorem idea; solve quadratic equations by factoring and the zero-product property.

Why this matters

Factoring reverses expansion and reveals roots. Zero-product reasoning is how many discrete equations get solved. Difference of squares appears in algorithmic identities and algebraic rewrites that avoid cancellation (Day 9).

Theory

Goal of factoring

Write a polynomial as a product of lower-degree polynomials (usually with integer or rational coefficients). Completely factored over a ring means factors are irreducible there (e.g. linear factors over \(\mathbb{R}\) when possible).

Zero-product property

For real (or integral domain) numbers: \[ab=0\quad\Longleftrightarrow\quad a=0\text{ or }b=0.\]

Corollary. If \((x-r)(x-s)=0\), then \(x=r\) or \(x=s\).

Greatest common factor (GCF)

Factor largest common monomial: \(6x^3+9x^2=3x^2(2x+3)\).

Factoring by grouping

Four terms: \(ax+ay+bx+by=a(x+y)+b(x+y)=(a+b)(x+y)\).

Trinomials \(x^2+bx+c\)

Find \(p,q\) with \(p+q=b\), \(pq=c\); then \(x^2+bx+c=(x+p)(x+q)\).

Trinomials \(ax^2+bx+c\) (\(a\neq 1\))

AC method: find numbers summing to \(b\) with product \(ac\); split middle; group.
Or trial factors of \(a\) and \(c\).

Difference of squares

\[a^2-b^2=(a-b)(a+b).\]

Proof. Expand right-hand side. \(\square\)

Sum/difference of cubes

\[ \begin{align*} a^3-b^3&=(a-b)(a^2+ab+b^2),\\ a^3+b^3&=(a+b)(a^2-ab+b^2). \end{align*} \]

Perfect square trinomials

\[a^2+2ab+b^2=(a+b)^2,\qquad a^2-2ab+b^2=(a-b)^2.\]

Factor theorem (idea)

If \(p(r)=0\), then \((x-r)\) is a factor of \(p\).
Trial rational roots (rational root theorem lite): any rational root \(\frac{p}{q}\) in lowest terms has \(p\mid\) constant term, \(q\mid\) leading coefficient.

Solving quadratics by factoring

  1. Write \(ax^2+bx+c=0\).
  2. Factor left side.
  3. Apply zero-product.
  4. Check.

Not all quadratics factor nicely over the integers; Day 19 gives formula and completing the square.

Strategy checklist

  1. GCF first.
  2. Count terms: \(2\) → difference of squares/cubes; \(3\) → trinomial/perfect square; \(4\) → grouping.
  3. Factor further until irreducible.
  4. Check by expansion.

Worked examples

Example 1 — GCF

\(12x^4-18x^2=6x^2(2x^2-3)\).

Example 2 — Grouping

\(x^3+2x^2+3x+6=x^2(x+2)+3(x+2)=(x^2+3)(x+2)\).

Example 3 — Simple trinomial

\(x^2-5x+6=(x-2)(x-3)\).

Example 4 — AC method

\(6x^2+7x-3\). \(ac=-18\); pair \(9,-2\): \(6x^2+9x-2x-3=3x(2x+3)-1(2x+3)=(3x-1)(2x+3)\).

Example 5 — Difference of squares

\(9x^2-16=(3x-4)(3x+4)\).
\(x^4-1=(x^2-1)(x^2+1)=(x-1)(x+1)(x^2+1)\).

Example 6 — Cubes

\(x^3-8=(x-2)(x^2+2x+4)\).
\(x^3+27=(x+3)(x^2-3x+9)\).

Example 7 — Perfect square

\(x^2-6x+9=(x-3)^2\).

Example 8 — Factor theorem trial

\(p(x)=x^3-2x^2-x+2\). \(p(1)=0\). Divide / synthetic: \((x-1)(x^2-x-2)=(x-1)(x-2)(x+1)\).

Example 9 — Solve by factoring

\(x^2-x-12=0\Rightarrow(x-4)(x+3)=0\Rightarrow x=4\) or \(x=-3\).

Example 10 — Quadratic no GCF miss

\(2x^2+4x=0\Rightarrow 2x(x+2)=0\Rightarrow x=0\) or \(x=-2\). (Do not divide by \(x\) and lose \(x=0\).)

Example 11 — Higher

\(x^3-x=x(x^2-1)=x(x-1)(x+1)\).

Example 12 — Multivariable

\(a^2-2ab+b^2-c^2=(a-b)^2-c^2=(a-b-c)(a-b+c)\).

Example 13 — Check

\((2x-1)(x+5)=2x^2+10x-x-5=2x^2+9x-5\).

Example 14 — Irreducible over reals?

\(x^2+1\) has no real linear factors; over complexes \((x-i)(x+i)\).

Exercises

Easy

  1. Factor \(15x^3-10x\).
  2. Factor \(x^2+7x+12\).
  3. Factor \(x^2-9\).
  4. Solve \((x-2)(x+5)=0\).
  5. Factor \(x^2-10x+25\).

Medium

  1. Factor \(6x^2-x-2\).
  2. Factor \(x^3+3x^2-x-3\) by grouping.
  3. Factor \(27x^3-1\).
  4. Factor \(x^4-16\) completely over the reals.
  5. Solve \(2x^2-5x-3=0\) by factoring.
  6. Solve \(x^2=5x\) without losing a root.
  7. Factor \(2x^3+4x^2-6x\) completely.
  8. Use factor theorem: show \(x+2\) divides \(x^3+6x^2+11x+6\); factor fully.

Hard / proof

  1. Prove \(a^2-b^2=(a-b)(a+b)\) and \(a^3-b^3=(a-b)(a^2+ab+b^2)\) by expansion.
  2. Prove zero-product property from field axioms (no zero divisors).
  3. Explain why dividing an equation by \(x\) can lose solutions; give example.
  4. Factor \(x^6-1\) completely over the reals (use difference of squares/cubes as needed).
  5. For which \(c\) does \(x^2+cx+1\) factor with real linear factors?
  6. Show that if \(p\) has roots \(r_1,\ldots,r_k\) distinct and \(\deg p=k\), then \(p(x)=a(x-r_1)\cdots(x-r_k)\).
  7. Disprove: every quadratic factors over the integers.

Challenge / CS-flavored

  1. Boolean algebra analogy: factoring vs expanding—when do you want CNF-like product form?
  2. Complexity identity: \(n^2-1=(n-1)(n+1)\) for analyzing neighboring sizes.
  3. Solve \(n(n-1)=20\) for integer \(n\) (combinatorial \(P(n,2)\) feel).
  4. Polynomials over \(\mathbb{Z}/2\mathbb{Z}\): factor \(x^2+x\) — note \(x^2+x=x(x+1)\) and every element is root (Freshman’s dream awareness).
  5. Rewrite \(x^2-y^2\) to factor a difference of measurements in code-free algebra.

Rational root theorem (stated)

If \(p(x)=a_n x^n+\cdots+a_0\) has integer coefficients and rational root \(\frac{u}{v}\) in lowest terms, then \(u\mid a_0\) and \(v\mid a_n\).
Trial list is finite—pair with synthetic division.

Irreducibles over \(\mathbb{R}\)

Over \(\mathbb{R}\), irreducible polynomials are degree \(1\), or degree \(2\) with negative discriminant. Higher degrees always factor into those (fundamental theorem of algebra + real coefficients force conjugate pairs)—stated for orientation, not proved.

Completing the square vs factoring

Not every monic quadratic with real roots factors “nicely” over \(\mathbb{Z}\), but it factors over \(\mathbb{R}\) as \(a(x-r)(x-s)\). Completing the square / formula always works over \(\mathbb{R}\) when \(\Delta\ge 0\).

Zero-product extended

\(a_1 a_2\cdots a_k=0\) iff some \(a_i=0\) (in a field / integral domain). Use after complete factorization.

Extra exercises

  1. Factor \(x^{3}+1\) completely over the reals.
  2. Solve \(x(x-3)(x+2)=0\).
  3. Factor \(a^{4}-b^{4}\) completely over the reals.
  4. Use rational root theorem candidates for \(2x^{3}+3x^{2}-1=0\); find one rational root if any.
  5. Explain why \(x^{2}-2\) is irreducible over \(\mathbb{Q}\) but reducible over \(\mathbb{R}\).

CS connection

Factoring reveals structure for partial fractions (Day 17) and closed forms of recurrences. Zero-product mirrors “if product of flags is zero…” less than boolean OR, but the logic of cases is the same. Irreducibility over a field matters in coding theory and crypto polynomials.

Common pitfalls

Pitfall What to do instead
Forgetting GCF Always pull GCF first
Sign errors in trinomials Check by FOIL
Dividing variables out of equations Factor and use zero-product
Stopping at \(x^2-1\) Continue to \((x-1)(x+1)\) if complete
Assuming all quadratics factor over \(\mathbb{Z}\) Discriminant / formula later
Dropping \((x^2+1)\) factors over reals Know when irreducible

Fully worked extra examples

E15 — Grouping four terms carefully.
\(xy+5x+3y+15=x(y+5)+3(y+5)=(x+3)(y+5)\).

E16 — Difference of squares twice.
\(x^{4}-16=(x^{2}-4)(x^{2}+4)=(x-2)(x+2)(x^{2}+4)\). Stop over reals; over complexes continue \(x^{2}+4=(x-2i)(x+2i)\).

E17 — Solve higher degree.
\(x^{3}-x^{2}-4x+4=0\). Group: \(x^{2}(x-1)-4(x-1)=(x^{2}-4)(x-1)=(x-2)(x+2)(x-1)=0\). Roots \(2,-2,1\).

E18 — Trinomial with leading coefficient.
\(8x^{2}-10x-3\): \(ac=-24\); pairs $ -12,2$: \(8x^{2}-12x+2x-3=4x(2x-3)+1(2x-3)=(4x+1)(2x-3)\).

End-of-day synthesis problems

S1. Factor completely \(2x^{3}-2x^{2}-12x\).

S2. Factor \(x^{3}+2x^{2}-x-2\) by grouping; solve \(=0\).

S3. Factor \(x^{4}-81\) completely over the reals.

S4. Solve \(x^{2}=7x\) without losing the root \(x=0\).

S5. Prove \(a^{3}+b^{3}=(a+b)(a^{2}-ab+b^{2})\) by expansion.

S6. AC-factor \(12x^{2}+5x-2\); solve \(=0\).

S7. Use factor theorem: test \(x=1,-1,2\) on \(x^{3}-2x^{2}-x+2\); factor fully.

S8. Explain why you cannot cancel \(x\) in \(x^{2}+x=0\) by dividing by \(x\) alone.

Checkpoint

  • Factor with GCF, grouping, trinomials
  • Apply difference of squares/cubes
  • Use factor theorem trials on cubics
  • Solve factorable quadratic equations without losing roots
  • Expand to verify factoring
  • S4 and S8 as verbal mastery checks

Write two takeaways in your own words.

Quick reference card

Pattern Factorization
GCF pull largest common monomial
\(x^{2}+bx+c\) \((x+p)(x+q)\), \(p+q=b\), \(pq=c\)
\(a^{2}-b^{2}\) \((a-b)(a+b)\)
\(a^{3}-b^{3}\) \((a-b)(a^{2}+ab+b^{2})\)
\(a^{3}+b^{3}\) \((a+b)(a^{2}-ab+b^{2})\)
Zero product \(ab=0\Rightarrow a=0\) or \(b=0\)

Always GCF first; always expand-check when unsure.

Deep dive — factoring patterns and zero-product

D1 — Complete factoring pipeline.
\(2x^{3}-2x^{2}-12x=2x(x^{2}-x-6)=2x(x-3)(x+2)\).
Order: GCF → trinomial → linear factors. Solve \(=0\): \(x=0,3,-2\).

D2 — Grouping cubic.
\(x^{3}+2x^{2}-x-2=x^{2}(x+2)-1(x+2)=(x^{2}-1)(x+2)=(x-1)(x+1)(x+2)\).
Roots \(1,-1,-2\). Always expand-check one intermediate if signs feel slippery.

D3 — Difference of squares twice.
\(x^{4}-81=(x^{2}-9)(x^{2}+9)=(x-3)(x+3)(x^{2}+9)\).
Over \(\mathbb{R}\) stop at irreducible \(x^{2}+9\); over \(\mathbb{C}\) continue if asked.

D4 — AC method with leading coefficient.
\(12x^{2}+5x-2\): \(ac=-24\); pair \(8,-3\):
\(12x^{2}+8x-3x-2=4x(3x+2)-1(3x+2)=(4x-1)(3x+2)\).
Solve \((4x-1)(3x+2)=0\): \(x=\frac14\) or \(x=-\frac23\).

D5 — Never divide away a root.
\(x^{2}=7x\Rightarrow x^{2}-7x=0\Rightarrow x(x-7)=0\Rightarrow x=0\) or \(7\).
Dividing by \(x\) first loses \(x=0\). Zero-product after factoring is the safe habit.

D6 — Sum/difference of cubes expand-check.
\(a^{3}+b^{3}=(a+b)(a^{2}-ab+b^{2})\): right side \(a^{3}-a^{2}b+ab^{2}+a^{2}b-ab^{2}+b^{3}=a^{3}+b^{3}\).
Same verification for \(a^{3}-b^{3}\).

D7 — Factor theorem trial on a cubic.
\(p(x)=x^{3}-2x^{2}-x+2\). \(p(1)=0\), so \((x-1)\) divides.
Synthetic/division: \(x^{2}-x-2=(x-2)(x+1)\). Full factor \((x-1)(x-2)(x+1)\).

Extra practice set

  1. Factor completely \(x^{4}-16\) over the reals.
  2. Factor \(8x^{2}-10x-3\); solve \(=0\).
  3. Prove \(a^{2}-b^{2}=(a-b)(a+b)\) by expansion.
  4. Rational root candidates for \(2x^{3}+3x^{2}-1\); test until one works or none.
  5. Explain why \(x^{2}-2\) is irreducible over \(\mathbb{Q}\) but factors over \(\mathbb{R}\).

Tomorrow

Day 17 — Rational expressions. Domain, simplify, arithmetic, complex fractions, partial fractions setup for distinct linear factors.