Factorization
1Introduction
Why is it good to know how to factor complex expressions? Imagine you have to prove that the number is divisible by six for every integer . Without modification, it is unclear. However, it is enough to factor 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 transform 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 section, we will gradually introduce four key factorization techniques. We will start from basic formulas, move to the general method of grouping, and finally explain completing the square. As a curiosity, we will also show that one can complete not only to a square but also to a cube, and surprisingly it can be useful.
2.1Difference and sum of powers formulas
Exercise 1
Verify by expanding that the following holds
What will the general formula for look like for a natural number ?
✓Solution
The answer to the question is Proposition 1.
Exercise 2
Verify by expanding that the following holds
What will the general formula for look like for an odd natural number ?
✓Solution
The answer to the question is Proposition 2.
After a while of investigation, we will surely come up with general formulas:
Theorem 1
For all real numbers and natural , it holds
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 proved.
The situation with is more curious in that such a factorization works only for odd . From the proof, it is visible why:
Theorem 2
For all real numbers and odd natural , it holds
Proof
The proposition can be proved similarly to the previous one – by observing which terms cancel out 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 really cannot be factored (in the domain of real numbers). However, all other can be factored, which we will gradually work towards.
Exercise 3
Factor 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
Factor the investigated expression into as many parentheses as possible.
2Hint
The sought factorization is . To investigate divisibility by 30, it is enough to investigate divisibility by , , separately.
✓Solution
It holds that . It suffices to prove that this expression is divisible by , , .
- divisibility by follows from the fact that of consecutive numbers , , at least one is even;
- similarly, divisibility by follows from numbers , , ;
- divisibility by is more complex. Certainly, when gives a remainder of 0, 1, or 4 when divided by 5, we are done, due to 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
The factorization of suggests a much simpler divisibility, which is sufficient.
2Hint
Since , it is enough 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 primes.
1Hint
The expression can be factored into a product of many parentheses.
2Hint
One possible factorization is . The second parenthesis can indeed be factored, but it is not evident at all how. A better factorization is . From this we factor further. Subsequently, we 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 only possible for the first one, where . In that case, we indeed have .
2.2Grouping
The common school procedure of successive factorization works even in harder problems. The idea is: notice that something can be factored out; factor it out; and see what happens next. For this procedure, there exists a very important trick usable even in harder problems: watch when the expression is zero.
Example 1
Factor the expression .
✓Solution
Without seeing the resulting factorization, we can say that will be in it, because the investigated expression is equal to 0 for . Thanks to this, we purposefully rearrange the terms as . Now we can factor out from both expressions and we have
This view 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.
Exercise 4
Factor:
- [2 factors]
- [3 factors]
- [3 factors]
- [4 factors] (harder†)
✓Solution
The individual factorizations are:
- An obvious zero point is , in the result we expect . We easily find .
- Here again it holds that whenever any of the numbers is equal to , the expression will be zero. Thus we expect in the result. Actually, that is all: . We can arrive at this gradually like this:
- When two numbers are equal, e.g., , the expression is zero. We manipulate the expression to have a parenthesis in the result. We expect that , (or the opposite) will also appear there.
- We proceed similarly to the previous exercise, since again we have equality for . The modifications are more complex here:Now let's focus on the parenthesis:Finally, the last parenthesis:Together we have
This view is not universal, because the factored factors 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
Factor into a product of two expressions:
✓Solution
The individual factorizations are:
- .
Hidden factorization and other algebraic modifications can be successfully used in this example:
Problem 4*
CPSJ† 2018For natural numbers it holds
Prove that
1Hint
The expression can be subtly factored.
2Hint
It holds that . Thus our divisibility simplifies to
The expression is equal to , we see a connection.
✓Solution
We factor the right side of the first divisibility:
The assumed divisibility translates to . It holds
The divisibility simplifies the situation to the fact that it suffices to prove . We prove this by using
Together with , we then have , so altogether 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 factor a quadratic polynomial into a product of simpler linear ones, e.g.
In general for real numbers , , we have
From this, we can easily derive the formula for the solutions of a quadratic equation.
In general, we actually used . However, we can also complete to a square by 'manufacturing' the middle coefficient, i.e., using the formula . We will demonstrate this on the following example:
Example 2
Factor .
✓Solution
The first thing that might occur to us is to complete to a square. By doing so 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 a known identity:
Exercise 6
Sophie-Germain identity†Factor .
✓Solution
By completing to a square we have
Try an example from the national round of MO:
Problem 5
CKMO 2012Determine all natural numbers for which is a prime number.
1Hint
The investigated expression can surprisingly be factored. 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
Clearly . 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 .
Learned techniques can be nicely put together in this observation:
Problem 6*
Justify that the expression can be factored into a product of non-constant expressions with real coefficients for every .
(Let us note that it can be proven that cannot be factored into a product of two non-constant parentheses with real coefficients.)
1Hint
For odd we have a formula. Let's realize that it is even enough for to have an odd divisor. Thanks to this observation, the even case is also simplifying. Can we solve the first even case ? Does it help with the rest?
2Hint
If has an odd divisor , where , then we can factor out from . 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*
Factor 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 factor this expression by repeatedly finding squares and using the formula for the difference of squares:
Let us note that we actually practically reconstructed Heron's† formula. For the area of a triangle with sides , it holds
This formula is usually presented in a computationally more acceptable form
Verify yourselves that this form is equivalent to our proven identity
Problem 8*
For which natural numbers is the number a prime number?
1Hint
The investigated expression resembles the Sophie-Germain identity. Try to fit it in there. Maybe it will be necessary to analyze some cases.
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 again evidently non-prime.
✓Solution
We will analyze two cases according to the parity of .
- If is even, then the number is clearly divisible by 4, so it is not a prime number.
- If is odd, then 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 clearly 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.
The only solution is therefore .
2.4Completing the cube
Finally, we will show a non-traditional technique: besides completing to a square, one can perform completing to a cube. This means that if we have , instead of directly applying the factorization formula, we can use
We will demonstrate this on an example:
Example 3
Factor .
✓Solution
Using completing 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 will use our already known factorization
Since , it suffices to prove . This looks tempting from the perspective of completing to a 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 seems we haven't helped ourselves. However, another trick is to split as . After suitable rearranging 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 it is exactly when , , , i.e., when . We are done.
3What to remember
3.1Techniques
- We look for differences/sums of powers so we can use and
- We check when the expression is zero, which helps us factor correctly
- We complete to a square/cube. We try multiple possibilities of how to do it
3.2Useful formulas
- Factorization of and (for odd )
- Expressions of the form can often be factored, even if it is not evident
- Non-evident factorization of and its consequences (Proposition 3)
- Inequality and its proof
- Other useful factorizations like
- etc, there are no limits to the imagination of problem authors...