Factorization
1Introduction
Why is it good to know how to factorize complex expressions? Imagine you have to prove that the number is divisible by six for every integer . Without modification, it is unclear. However, it suffices to factorize the expression:
Suddenly, we see a product of three consecutive numbers, of which at least one is always even and exactly one is divisible by three. Divisibility by six is thus obvious.
The ability to turn a confusing sum into a clear product is one of the key techniques in solving tricky mathematical problems†. In this lesson, we will systematically derive known factorizations, explain the tricks and intuition behind them, and practice everything on examples.
2Theory
In this part, we will gradually introduce four key factorization techniques. We will start with basic formulas, move on to the general method of factoring by grouping, and finally explain completing the square. As an interesting point, we will also show that one can complete not only to a square but also to a cube, and surprisingly, this can be useful.
2.1Formulas for difference and sum of powers
Exercise 1
Verify by expanding that the following hold:
What will the general formula for look like for natural ?
✓Solution
The answer to the question is Proposition 1.
Exercise 2
Verify by expanding that the following hold:
What will the general formula for look like for odd natural ?
✓Solution
The answer to the question is Proposition 2.
After a moment of exploration, we will surely come up with the general formulas:
Theorem 1
For all real numbers and natural , it holds that
Proof
We subtract the expressions:
On the left, we can factor out the large parenthesis and get exactly the right side of the proven formula. On the right, all terms cancel out. The proposition is proven.
The situation with is more curious in that such a factorization works only for odd . The reason is visible from the proof:
Theorem 2
For all real numbers and odd natural , it holds that
Proof
The proposition can be proven similarly to the previous one – by observing which terms are subtracted when expanding the right side. However, a trickier proof is worth mentioning, in which we substitute the value instead of into the formula for . Thanks to the oddness of , then . Every second term of the parenthesis changes sign when replacing with .
How is it for even ? For the expression , it can be proven that it truly cannot be factorized (in the domain of real numbers). However, all other can be factorized, which we will gradually work towards.
Exercise 3
Factorize into a product of two expressions without roots ( are natural numbers).
✓Solution
The individual factorizations are
In more complex problems, factorization is typically just one of several steps. We can try:
Problem 1
Prove that for every natural number , the number is divisible by 30.
1Hint
Factorize the examined expression into a product of as many parentheses as possible.
2Hint
The sought factorization is . To investigate divisibility by 30, it suffices to investigate divisibility by , , and separately.
✓Solution
It holds that . It suffices to prove that this expression is divisible by , , and .
- divisibility by follows from the fact that out of the consecutive numbers , , at least one is even;
- similarly, divisibility by follows from the numbers , , ;
- divisibility by is more complex. Certainly, when gives a remainder of 0, 1, or 4 when divided by 5, we are done, because of the factors , , . Then if or , then or , so again we have a number divisible by 5.
Problem 2
Find three distinct pairs of natural numbers such that the number is divisible by and .
1Hint
Factorizing will hint at a much simpler divisibility that suffices.
2Hint
Since , it suffices that .
✓Solution
It holds that , so , thus it suffices that . We can easily achieve this with pairs equal to .
Problem 3*
Find all natural numbers greater than 1 such that is a product of three not necessarily distinct prime numbers.
1Hint
The expression can be factorized into a product of many parentheses.
2Hint
One possible factorization is . The second parenthesis can indeed be factorized, but it is not at all evident how. A better factorization is . We factorize further from here. Consequently, we already have at least 4 factors, which sounds suspicious if the number is to be a product of three primes.
✓Solution
We have the factorization
For this to be a product of three primes, one parenthesis must be equal to 1. For , this is possible only for the first one, where . Then we indeed have .
2.2Factorization by grouping
The common school procedure of gradual factorization works even in harder problems. The idea is: notice that something can be taken out in front of a parenthesis; take it out; and see what happens next. There exists a very important trick for this procedure applicable even in harder problems: watch when the expression is zero.
Example 1
Factorize the expression .
✓Solution
Without seeing the resulting factorization, we can say that it will contain , because the examined expression is equal to 0 for . Thanks to this, we purposefully rearrange the terms as . Now we can take out in front of the parenthesis from both expressions and we have
This perspective explains why in the formulas and from the previous section we have and ; and also why the second one requires odd – for or , or are zero respectively.
Exercise 4
Factorize:
- [2 factors]
- [3 factors]
- [3 factors]
- [4 factors] (harder†)
✓Solution
The individual factorizations are:
- An obvious zero point is , we expect in the result. We easily find .
- Here it holds again that whenever any of the numbers is equal to , the expression will be zero. Thus, we expect in the result. It is essentially everything: . We can gradually arrive at this as follows:
- When two numbers are equal, e.g., , the expression is zero. We modify the expression to have the parenthesis in the result. We expect , (or their opposites) to appear there as well.
- We proceed similarly to the previous exercise, since we again have equality for . The modifications are more complex here:Now let's focus on the parenthesis:Finally the last parenthesis:Together we have
This perspective is not universal, because the factorized components do not have to be linear at all or can be more complex and it is harder to see the root. Then we have no choice but to play with rearranging terms and successive factoring.
Exercise 5
Factorize into a product of two expressions:
✓Solution
The individual factorizations are:
- .
Hidden factorization and other algebraic manipulations can be successfully used in this example:
Problem 4*
CPSJ† 2018For natural numbers , it holds that
Prove that
1Hint
The expression can be inconspicuously factorized.
2Hint
It holds that . Thus, our divisibility simplifies to
The expression is equal to , we see the connection.
✓Solution
We factorize the right side of the first divisibility:
The assumed divisibility translates to . It holds that
The divisibility simplifies the situation to the fact that it suffices to prove . We prove this by using
Together with , we then have , so we are done.
2.3Completing the square
Completing the square is one of the oldest and most elegant techniques in algebra†. It allows us to factorize a quadratic polynomial into a product of simpler linear ones, e.g.,
In general, for real numbers , , we have
From this, we easily derive the formula for solutions of a quadratic equation.
Generally, we actually used . However, we can also complete to a square by creating
the middle coefficient, i.e., using the formula . We demonstrate this on the following example:
Example 2
Factorize .
✓Solution
The first thing that might occur to us is to complete to a square. By doing this we get
This did not help us much. Let's try something else, let's complete to a square. Then we have
Practice this by deriving the known identity:
Exercise 6
Sophie-Germain identity†Factorize .
✓Solution
By completing to a square we have
Try an example from the national round of the MO:
Problem 5
CKMO 2012Determine all natural numbers for which is a prime number.
1Hint
Surprisingly, the examined expression can be factorized. Completing the square is a fine technique. Just be careful what we are completing.
2Hint
The key completion is
Do we see a known formula?
✓Solution
It holds that
Obviously . The second number is positive for , because
For the product to be a prime number, since , then . By solving the quadratic equation, we get and .
The learned techniques can be nicely put together in this observation:
Problem 6*
Justify that the expression can be factorized into a product of non-constant expressions with real coefficients for every .
(Note that it can be proven that cannot be factorized into a product of two non-constant parentheses with real coefficients.)
1Hint
For odd we have a formula. Let's realize that it is enough for to have an odd divisor. Thanks to this observation, even the even case is simplifiable. Can we solve the first even case ? Can it help us with the rest?
2Hint
If has an odd divisor , where , then we can take out from in front of a parenthesis. It remains to solve numbers that do not have an odd divisor – that is, powers of 2. According to the problem statement , so the smallest interesting power is 4; for such powers, we have completing the square. But what about higher powers? Well, those are fortunately divisible by 4.
✓Solution
If has an odd divisor , where , then
Otherwise, is a power of 2 and thanks to it is divisible by 4, so . Then
A few more harder problems for practice:
Problem 7*
Factorize into a product of four non-constant parentheses.
1Hint
Notice that appears in the expression, which is equal to . The key trick is to combine it with the rest of the expression using another completion to a square, where one of these squares
will be .
2Hint
The second sought square
will be , as it holds: . That fits quite well with the rest of the expression.
✓Solution
First we notice in the expression and create a square:
Now we apply completing the square to the first two terms, specifically we complete for and :
We can easily factorize this expression by repeated search for squares and using the formula for the difference of squares:
Note that we have basically reconstructed Heron's† formula. For the area of a triangle with sides , it holds that
This formula is usually presented in a computationally more acceptable form
Convince yourself that this form is equivalent to our proven identity
Problem 8*
For which natural numbers is the number a prime number?
1Hint
The examined expression resembles the Sophie-Germain identity. Try to fit it there. Perhaps some cases will need to be analyzed.
2Hint
To be able to use Sophie-Germain, we need to be in the form . This is certainly true for odd , because then
On the other hand, the case of even is evidently non-prime.
✓Solution
We analyze two cases according to the parity of .
- If is even, then the number is obviously divisible by 4, so it is not a prime number.
- If is odd, let's notice that:Our expression thus has the form for , . Thus we can use the Sophie-Germain identityFor this product to be a prime number, one of the factors must be equal to 1. The second factor is obviously greater than 1 for every . Let's analyze the first factor, which after completing to a square is equal to:For this to be equal to 1, we must have , so . Then indeed is a prime number.
Thus, the only solution is .
2.4Completing the cube
Finally, we will show a non-traditional technique: besides completing the square, one can perform completing the cube. This means that if we have , instead of directly applying the formula for factorization into a product, we can use
We will demonstrate this on an example:
Example 3
Factorize .
✓Solution
Using completion to a cube we have
This factorization is very interesting in itself, as it allows us to easily prove an inequality:
Theorem 3
Let be real numbers for which . Then
where equality occurs if and only if or .
Proof
We use our already known factorization
Since , it suffices to prove . This looks tempting from the perspective of completing the square, for example, we can try to complete to a square. However, I will reveal that this will not lead to the goal. The trick to proving this inequality is to multiply it by two and prove the equivalent inequality
It looks like we haven't helped ourselves. But the next trick is to split as . After suitable rearrangement of terms, we then have
Since this last expression is certainly non-negative, the proof of the inequality is finished. Equality occurs if and only if the first parenthesis is zero or the second parenthesis is zero. From the proof of its non-negativity, we see that this is exactly when , , , thus when . We are done.
3What to remember
3.1Techniques
- We look for differences/sums of powers so we can use and
- We watch when the expression is zero, which helps us factorize correctly
- We complete to a square/cube. We try more options on how to do it
3.2Useful formulas
- Factorization of and (for odd )
- Expressions of the form can often be factorized, even if it is not obvious
- The non-evident factorization and its consequences (Proposition 3)
- Inequality and its proof
- Other useful factorizations like
- etc., there are no limits to the imagination of problem authors...