The two identities behind this method
To factorize an expression is to write it as a product of simpler expressions. You already know how to factorize expressions such as \( x^2 - 9 \) and \( x^2 + 6x + 9 \). Everything in this part is built from just two of those tools. The first one builds a perfect square:
\[ (a + b)^2 = a^2 + 2ab + b^2 \]
\[ (a - b)^2 = a^2 - 2ab + b^2 \]
The second one breaks a difference of two squares into two factors:
\[ a^2 - b^2 = (a + b)(a - b) \]
Read the square formulas backwards and a sum of two squares becomes a whole square with \( 2ab \) taken away or added back. These two forms are used again and again in the examples:
\[ a^2 + b^2 = (a + b)^2 - 2ab \]
\[ a^2 + b^2 = (a - b)^2 + 2ab \]
Perfect square: an expression that is the square of another expression. For example, \( x^4 + 2x^2 + 1 = (x^2 + 1)^2 \), so \( x^4 + 2x^2 + 1 \) is a perfect square.
The whole plan of this lesson is one idea: rewrite the expression as (one perfect square) minus (another perfect square), then use the difference of two squares.
First method: making a perfect square
Look at \( a^4 + a^2b^2 + b^4 \). Its first term is \( (a^2)^2 \) and its last term is \( (b^2)^2 \). If the middle term were \( 2a^2b^2 \), the whole thing would simply be \( (a^2 + b^2)^2 \). The middle term is only \( a^2b^2 \), so it is one \( a^2b^2 \) short. We therefore add \( a^2b^2 \) and take it away again. Adding and subtracting the same quantity leaves the value unchanged; only the shape of the expression changes.
Step 1: Write the first and last terms as squares and split the middle term as \( a^2b^2 = 2a^2b^2 - a^2b^2 \):
\[ a^4 + a^2b^2 + b^4 = (a^2)^2 + 2a^2b^2 + (b^2)^2 - a^2b^2 \]
Step 2: The first three terms match \( (a + b)^2 = a^2 + 2ab + b^2 \), with \( a^2 \) in place of \( a \) and \( b^2 \) in place of \( b \). Also \( a^2b^2 = (ab)^2 \), so this becomes:
\[ = (a^2 + b^2)^2 - (ab)^2 \]
Step 3: This is now a difference of two squares, so applying \( a^2 - b^2 = (a + b)(a - b) \):
\[ = (a^2 + b^2 + ab)(a^2 + b^2 - ab) \]
Step 4: Arranging the terms of each factor in descending powers of \( a \):
\[ = (a^2 + ab + b^2)(a^2 - ab + b^2) \]
\[ a^4 + a^2b^2 + b^4 = (a^2 + ab + b^2)(a^2 - ab + b^2) \]
The two factors look almost the same. The only difference is the sign of the middle term \( ab \): plus in one, minus in the other.
Completing the square: adding a suitable term and subtracting the same term, so that part of the expression becomes a perfect square.
Second method: starting from the sum of two squares
The same expression can be factorized another way. This time the two terms with power 4 are kept together, and the formula \( a^2 + b^2 = (a + b)^2 - 2ab \) is used.
Step 1: Putting the two fourth power terms side by side:
\[ a^4 + a^2b^2 + b^4 = (a^2)^2 + (b^2)^2 + a^2b^2 \]
Step 2: Using the sum of squares formula on \( (a^2)^2 + (b^2)^2 \):
\[ = (a^2 + b^2)^2 - 2a^2b^2 + a^2b^2 \]
Step 3: Collecting the like terms, since \( -2a^2b^2 + a^2b^2 = -a^2b^2 \):
\[ = (a^2 + b^2)^2 - (ab)^2 \]
Step 4: Applying the difference of two squares and tidying each factor:
\[ = (a^2 + ab + b^2)(a^2 - ab + b^2) \]
Both routes lead to the same answer. The first splits the middle term; the second turns the sum of two squares into a whole square. Most of the examples below use the second route, because it shows you straight away what has to be subtracted.
How to choose what to add and subtract
The middle term is different in every question, so you have to decide which perfect square to build. Follow this order:
- If every term has a common factor, take it out first.
- Write the first and last terms as squares, \( A^2 \) and \( B^2 \).
- Recall that \( (A + B)^2 \) has middle term \( +2AB \) and \( (A - B)^2 \) has middle term \( -2AB \), and pick one.
- Compare that middle term with the one in the question and work out what is left over.
- The leftover must be a perfect square being subtracted. If it is not, try the square with the other sign.
- Use the difference of two squares, then arrange each factor in descending powers.
A negative middle term does not mean you must use \( (A - B)^2 \). In \( 49a^4 - 154a^2b^2 + 9b^4 \), using \( (7a^2 - 3b^2)^2 \) leaves \( -112a^2b^2 \), which is not a perfect square. Using \( (7a^2 + 3b^2)^2 \) leaves \( -196a^2b^2 = -(14ab)^2 \), and the factorization works. The leftover decides, not the sign.
Example 1: when one square is a number
Factorize \( y^4 + y^2 + 1 \). This is exactly the form \( a^4 + a^2b^2 + b^4 \) with \( a = y \) and \( b = 1 \).
Step 1: Writing the terms as squares:
\[ y^4 + y^2 + 1 = (y^2)^2 + (1)^2 + y^2 \]
Step 2: Using \( a^2 + b^2 = (a + b)^2 - 2ab \):
\[ = (y^2 + 1)^2 - 2 \cdot y^2 \cdot 1 + y^2 \]
Step 3: Collecting like terms, because \( -2y^2 + y^2 = -y^2 \):
\[ = (y^2 + 1)^2 - (y)^2 \]
Step 4: Using \( a^2 - b^2 = (a + b)(a - b) \):
\[ = (y^2 + 1 + y)(y^2 + 1 - y) \]
Step 5: Arranging in descending powers of \( y \) gives the answer:
\[ = (y^2 + y + 1)(y^2 - y + 1) \]
Example 2: when there is no middle term
Factorize \( y^4 + 64 \). There is no middle term at all, yet the method still works. Building \( (y^2 + 8)^2 \) brings in an extra \( 16y^2 \), and \( 16y^2 = (4y)^2 \) is itself a perfect square.
Step 1: Writing both terms as squares:
\[ y^4 + 64 = (y^2)^2 + (8)^2 \]
Step 2: Using the sum of two squares formula:
\[ = (y^2 + 8)^2 - 2 \cdot y^2 \cdot 8 \]
Step 3: Multiplying out, \( 2 \cdot y^2 \cdot 8 = 16y^2 = (4y)^2 \), so:
\[ = (y^2 + 8)^2 - (4y)^2 \]
Step 4: Applying the difference of two squares:
\[ = (y^2 + 8 + 4y)(y^2 + 8 - 4y) \]
Step 5: Arranging each factor gives the answer:
\[ = (y^2 + 4y + 8)(y^2 - 4y + 8) \]
This only works when the leftover is a perfect square. In \( y^4 + 64 \) the leftover \( 16y^2 \) is one, so it worked. In \( x^4 + y^4 \) the leftover \( 2x^2y^2 \) is not a perfect square, so this method cannot factorize it.
Example 3: a large negative middle term
Factorize \( 49a^4 - 154a^2b^2 + 9b^4 \). Here \( 49a^4 = (7a^2)^2 \) and \( 9b^4 = (3b^2)^2 \). As the caution above showed, the square to use is \( (7a^2 + 3b^2)^2 \).
Step 1: Writing the first and last terms as squares:
\[ = (7a^2)^2 + (3b^2)^2 - 154a^2b^2 \]
Step 2: Using the sum of two squares formula:
\[ = (7a^2 + 3b^2)^2 - 2 \cdot 7a^2 \cdot 3b^2 - 154a^2b^2 \]
Step 3: Multiplying, \( 2 \cdot 7a^2 \cdot 3b^2 = 42a^2b^2 \):
\[ = (7a^2 + 3b^2)^2 - 42a^2b^2 - 154a^2b^2 \]
Step 4: Adding the like terms, since \( 42 + 154 = 196 \):
\[ = (7a^2 + 3b^2)^2 - 196a^2b^2 \]
Step 5: Since \( 196 = 14^2 \), writing the subtracted term as a square:
\[ = (7a^2 + 3b^2)^2 - (14ab)^2 \]
Step 6: Applying the difference of two squares:
\[ = (7a^2 + 3b^2 + 14ab)(7a^2 + 3b^2 - 14ab) \]
Step 7: Arranging each factor gives the answer:
\[ = (7a^2 + 14ab + 3b^2)(7a^2 - 14ab + 3b^2) \]
Example 4: completing the square with a minus sign
Factorize \( p^4 - 3p^2 + 1 \). Using \( (p^2 + 1)^2 \) would leave \( -5p^2 \), which is not a perfect square. So here the other form, \( a^2 + b^2 = (a - b)^2 + 2ab \), is used.
Step 1: Writing the terms as squares:
\[ p^4 - 3p^2 + 1 = (p^2)^2 + (1)^2 - 3p^2 \]
Step 2: Using \( a^2 + b^2 = (a - b)^2 + 2ab \):
\[ = (p^2 - 1)^2 + 2 \cdot p^2 \cdot 1 - 3p^2 \]
Step 3: Collecting like terms, because \( 2p^2 - 3p^2 = -p^2 \):
\[ = (p^2 - 1)^2 - (p)^2 \]
Step 4: Applying the difference of two squares:
\[ = (p^2 - 1 + p)(p^2 - 1 - p) \]
Step 5: Arranging each factor gives the answer:
\[ = (p^2 + p - 1)(p^2 - p - 1) \]
Example 5: expressions with fractions
Factorize \( \frac{x^4}{y^4} + \frac{x^2}{y^2} + 1 \). The fractions change nothing. Since \( \frac{x^4}{y^4} = \left(\frac{x^2}{y^2}\right)^2 \) and \( \frac{x^2}{y^2} = \left(\frac{x}{y}\right)^2 \), this is the same form again.
Step 1: Writing the terms as squares:
\[ = \left(\frac{x^2}{y^2}\right)^2 + (1)^2 + \frac{x^2}{y^2} \]
Step 2: Using the sum of two squares formula:
\[ = \left(\frac{x^2}{y^2} + 1\right)^2 - 2 \cdot \frac{x^2}{y^2} \cdot 1 + \frac{x^2}{y^2} \]
Step 3: Collecting like terms, \( -\frac{2x^2}{y^2} + \frac{x^2}{y^2} = -\frac{x^2}{y^2} \), which gives a difference of squares:
\[ = \left(\frac{x^2}{y^2} + 1\right)^2 - \left(\frac{x}{y}\right)^2 \]
Step 4: Applying the difference of two squares and arranging each factor:
\[ \begin{aligned} &= \left(\frac{x^2}{y^2} + \frac{x}{y} + 1\right) \\ &\quad \times \left(\frac{x^2}{y^2} - \frac{x}{y} + 1\right) \end{aligned} \]
Example 6: two squares inside a longer expression
Factorize \( x^2 - 10x + 24 + 6y - 9y^2 \). This is not the form \( a^4 + a^2b^2 + b^4 \), but the idea is the same: build one perfect square from the \( x \) terms and gather everything else into a perfect square in \( y \). To complete the square on \( x^2 - 10x \), add and subtract \( 5^2 \), because \( 10x = 2 \cdot x \cdot 5 \).
Step 1: Adding and subtracting \( 5^2 \):
\[ = x^2 - 2 \cdot x \cdot 5 + 5^2 - 5^2 + 24 + 6y - 9y^2 \]
Step 2: Writing the first three terms as \( (a - b)^2 \):
\[ = (x - 5)^2 - 25 + 24 + 6y - 9y^2 \]
Step 3: Adding the numbers, \( -25 + 24 = -1 \):
\[ = (x - 5)^2 - 1 + 6y - 9y^2 \]
Step 4: Taking a minus sign outside the last three terms, which reverses every sign inside the bracket:
\[ = (x - 5)^2 - (1 - 6y + 9y^2) \]
Step 5: The bracket is \( (1)^2 - 2 \cdot 1 \cdot 3y + (3y)^2 \), so it is a square:
\[ = (x - 5)^2 - (1 - 3y)^2 \]
Step 6: Applying the difference of two squares:
\[ = (x - 5 + 1 - 3y)(x - 5 - 1 + 3y) \]
Step 7: Simplifying the numbers in each factor gives the answer:
\[ = (x - 3y - 4)(x + 3y - 6) \]
A minus sign placed in front of a bracket reverses the sign of every term inside: \( -1 + 6y - 9y^2 = -(1 - 6y + 9y^2) \). In the second factor both terms of \( (1 - 3y) \) change sign too, which is why it reads \( -1 + 3y \).
Checking an answer by multiplying
To check a factorization, multiply the factors back together. If you get the original expression, the answer is right. Let us check Example 1. Both factors contain \( y^2 + 1 \), so they can be grouped like this:
\[ (y^2 + y + 1)(y^2 - y + 1) = \{(y^2 + 1) + y\}\{(y^2 + 1) - y\} \]
This is \( (a + b)(a - b) = a^2 - b^2 \), so it equals:
\[ = (y^2 + 1)^2 - y^2 \]
Expanding the square and collecting like terms:
\[ = y^4 + 2y^2 + 1 - y^2 = y^4 + y^2 + 1 \]
Multiplying gave back the original expression, so the answer is right. When there is time in an exam, do this check; it catches sign mistakes at once.
The full lesson is waiting for you
The notes are free to read in full. A free account opens the rest of the practice, and tracks your progress and confidence score for every subject. Presentations and videos need approval from Learn Yeti.