Sub topic 3
Perfect square trinomials
Prerequisites
This chapter assumes you can multiply binomials, apply the distributive property, factor out a greatest common factor (GCF), and use exponent rules. Terms, coefficients, and degree are used without further definition.
Perfect square trinomials
A perfect square trinomial is what you get when you square a binomial:
(a + b)^2 = a^2 + 2ab + b^2
(a - b)^2 = a^2 - 2ab + b^2To recognize one, check three things. The first and last terms must be perfect squares. The middle term must equal twice the product of the square roots of those terms. The sign of the middle term tells you whether the binomial uses + or -.
For example, x^2 + 6x + 9 has first term x^2, last term 3^2, and middle term 2(x)(3) = 6x. It factors as (x + 3)^2.
from sympy import symbols, factor, expand
x = symbols('x')
expr = x**2 + 6*x + 9
print(factor(expr)) # (x + 3)**2
print(expand(factor(expr)) == expr) # TrueSum and difference of cubes
Two cube patterns cover binomials of the form a^3 + b^3 or a^3 - b^3:
a^3 + b^3 = (a + b)(a^2 - ab + b^2)
a^3 - b^3 = (a - b)(a^2 + ab + b^2)The trinomial factor never factors further over the integers. For example, 8x^3 - 27 has a = 2x and b = 3, so it factors as (2x - 3)(4x^2 + 6x + 9).
::: callout warning A sum of squares, such as a^2 + b^2, does not factor over the integers. Do not write it as (a + b)^2, because that expansion includes a 2ab middle term. :::
A step-by-step strategy for factoring completely
Apply these steps in order, and repeat them until no factor can be split further:
- Factor out the GCF.
- Count the terms. Two terms suggest a difference of squares or cubes. Three terms suggest a trinomial or perfect square trinomial. Four terms suggest grouping.
- Check every factor again.
Recognizing polynomials that do not factor
Some polynomials cannot be factored over the integers. The polynomial x^2 + 1 is one example. A factoring (x + p)(x + q) would need p + q = 0 and pq = 1, which has no integer solution.
Using factoring to solve equations
Factoring turns a polynomial equation into simpler equations. The zero product property states that if a product equals zero, at least one factor equals zero.
To solve x^2 - 5x + 6 = 0, factor the left side as (x - 2)(x - 3) = 0. Then set each factor to zero: x = 2 or x = 3.
Exercise
Factor 4x^2 - 12x + 9.
Show answer
It is a perfect square trinomial. 4x^2 = (2x)^2, 9 = 3^2, and 12x = 2(2x)(3). The result is (2x - 3)^2.