How to Complete the Square With Algebraic Expressions
What does it mean to complete the square?
In algebra, completing the square is the process of converting a quadratic expression of the form ax^2 + bx +c into the form r(x + p)^2 + q where a, b, c, r, p and q are real numbers.
It can be useful when trying to solve equations of the form ax^2 + bx + c = 0, when looking at properties of quadratic graphs and even in some algebraic proofs.
In this article we are going to look at how to complete the square and how we can then apply this to a number of problems.
It can be useful when trying to solve equations of the form ax^2 + bx + c = 0, when looking at properties of quadratic graphs and even in some algebraic proofs.
In this article we are going to look at how to complete the square and how we can then apply this to a number of problems.
How to complete the square for x^2 + bx + c
Let's start by looking at how to complete the square for a quadratic where the coefficient of x^2 is 1. We will write this as x^2 + bx + c, where b and c are real numbers.
We want to convert this into an expression of the form (x + p)^2 + q. If we look at what happens when this form is expanded we get:
(x + p)^2 + q = x^2 + px + px + p^2 + q
= x^2 + 2px + p^2 + q
By comparing this to our initial expression, we can see that 2p = b (hence p = b/2) and p^2 + q = c.
In practice, this makes p very easy to find and q follows on from this. Let's try this with an example.
We want to convert this into an expression of the form (x + p)^2 + q. If we look at what happens when this form is expanded we get:
(x + p)^2 + q = x^2 + px + px + p^2 + q
= x^2 + 2px + p^2 + q
By comparing this to our initial expression, we can see that 2p = b (hence p = b/2) and p^2 + q = c.
In practice, this makes p very easy to find and q follows on from this. Let's try this with an example.
Example 1: Complete the square for x^2 + 4x + 7
Remember we are converting into (x + p)^2 + q.
The first step is the easy one; to get the correct coefficient of x from our new expression, we must halve our original coefficient. In this case 4 ÷ 2 = 2 and so we get x^2 + 4x + 7 = (x + 2)^2 + q
We must now find q. The simple way in practice is to consider what happens when the (x + 2)^2 is expanded.
(x + 2)^2 = x^2 + 4x + 4
To make (x + 2)^2 equal to x^2 + 4x we would need to subtract this spare 4 at the end before adding on the existing 7 and simplifying. Therefore we get;
x^2 + 4x + 7 = (x + 2)^2 − 4 + 7
= (x + 2)^2 + 3
The first step is the easy one; to get the correct coefficient of x from our new expression, we must halve our original coefficient. In this case 4 ÷ 2 = 2 and so we get x^2 + 4x + 7 = (x + 2)^2 + q
We must now find q. The simple way in practice is to consider what happens when the (x + 2)^2 is expanded.
(x + 2)^2 = x^2 + 4x + 4
To make (x + 2)^2 equal to x^2 + 4x we would need to subtract this spare 4 at the end before adding on the existing 7 and simplifying. Therefore we get;
x^2 + 4x + 7 = (x + 2)^2 − 4 + 7
= (x + 2)^2 + 3
Example 2: x^2 - 8x + 1
Consider the coefficient of x. Half of −8 is −4, giving us:
x^2 − 8x + 1 = (x − 4)^2 + q
When expanded, (x − 4)^2 gives us a +16 on the end which we therefore need to subtract again, before adding on the 1 from the original expression.
Therefore x^2 − 8x + 1 = (x − 4)^2 − 16 + 1
= (x − 4)^2 − 15
x^2 − 8x + 1 = (x − 4)^2 + q
When expanded, (x − 4)^2 gives us a +16 on the end which we therefore need to subtract again, before adding on the 1 from the original expression.
Therefore x^2 − 8x + 1 = (x − 4)^2 − 16 + 1
= (x − 4)^2 − 15
Completing the square for expressions of the form ax^2 + bx + c
So far we have seen two examples with quadratics where the coefficient of the x^2 is 1. But what do we do if this first coefficient is not equal to 1?
The answer to this is simple; we must first factorise the quadratic, taking out the coefficient a and leaving us with a new expression with just x^2 at the beginning. We can then multiply the factor back in at the end.
Algebraically this looks like this:
ax^2 + bx + c = a (x^2 + b/a x + c/a)
The expression in the bracket can then be dealt with as in our earlier examples.
The answer to this is simple; we must first factorise the quadratic, taking out the coefficient a and leaving us with a new expression with just x^2 at the beginning. We can then multiply the factor back in at the end.
Algebraically this looks like this:
ax^2 + bx + c = a (x^2 + b/a x + c/a)
The expression in the bracket can then be dealt with as in our earlier examples.
Example 3: 2x^2 + 12x + 5
First factor out the 2 from the x^2:
2x^2 + 12x + 5 = 2[x^2 + 6x + 5/2]
Now complete the square for the quadratic in the brackets.
2[x^2 + 6x + 5/2] = 2[(x + 3)^2 − 9 + 5/2]
= 2[(x + 3)^2 − 13/2]
We can now multiply the 2 back in to get:
2x^2 + 12x + 5 = 2(x + 3)^2 − 13
Note: If preferred, it is also perfectly acceptable to just factorise the 2 out of the first two terms and leave the +5 on the end to get 2x^2 + 12x + 5 = 2[x^2 + 6x] + 5 before completing the square on the x^2 + 6x. It is a matter of choice; both will get the same answer.
2x^2 + 12x + 5 = 2[x^2 + 6x + 5/2]
Now complete the square for the quadratic in the brackets.
2[x^2 + 6x + 5/2] = 2[(x + 3)^2 − 9 + 5/2]
= 2[(x + 3)^2 − 13/2]
We can now multiply the 2 back in to get:
2x^2 + 12x + 5 = 2(x + 3)^2 − 13
Note: If preferred, it is also perfectly acceptable to just factorise the 2 out of the first two terms and leave the +5 on the end to get 2x^2 + 12x + 5 = 2[x^2 + 6x] + 5 before completing the square on the x^2 + 6x. It is a matter of choice; both will get the same answer.
Example 4: 2x^2 + 6x - 8
First factor out the coefficient of x^2:
2x^2 + 6x − 8 = 2(x2 + 3x − 4)
Now we deal with the quadratic as before:
2(x^2 + 3x − 4) = 2 [(x + 3/2)^2 − (3/2)2 − 4]
= 2 [(x + 3/2)^2 − 25/4]
= 2(x + 3/2)^2 − 25/2
2x^2 + 6x − 8 = 2(x2 + 3x − 4)
Now we deal with the quadratic as before:
2(x^2 + 3x − 4) = 2 [(x + 3/2)^2 − (3/2)2 − 4]
= 2 [(x + 3/2)^2 − 25/4]
= 2(x + 3/2)^2 − 25/2
Solving a quadratic by completing the square
One of the main uses for completing the square is when solving a quadratic equation. If the equation has irrational solutions, then factorising into two brackets is not practical and so completing the square becomes the best alternative to using the quadratic formula. Completing the square can also be used for rational number solutions; again it depends on personal preference.
Solve the equation x^2 − 11x + 4 = 0
First complete the square on the left-hand side.
x^2 − 11x + 4 = (x − 11/2)^2 − (11/2)^2 + 4
= (x − 11/2)^2 − 105/4
We can now set this equal to 0 as in the original equation and rearrange to find x.
(x − 11/2)^2 − 105/4 = 0
(x − 11/2)^2 = 105/4
x − 11/2 = ±(√105)/2
x = 11/2 ±(√105)/2
= 0.377 and 10.623 (both to 3 d.p.)
Solve the equation x^2 − 11x + 4 = 0
First complete the square on the left-hand side.
x^2 − 11x + 4 = (x − 11/2)^2 − (11/2)^2 + 4
= (x − 11/2)^2 − 105/4
We can now set this equal to 0 as in the original equation and rearrange to find x.
(x − 11/2)^2 − 105/4 = 0
(x − 11/2)^2 = 105/4
x − 11/2 = ±(√105)/2
x = 11/2 ±(√105)/2
= 0.377 and 10.623 (both to 3 d.p.)
Remember: When square rooting, we get two answers; the positive root and the negative root. It is important to take this into account in our answer.
Solving a quadratic of the form ax^2 + bx + c = 0 by completing the square
When solving a quadratic that equals zero we can simply divide each term by the coefficient of x^2 in order to get a quadratic with a coefficient of 1 at the beginning. There is no need to factorise, as dividing the zero on the right-hand side will still give you zero.
3x^2 + 6x − 2 = 0
x^2 + 2x − 2/3 = 0
(x + 1)^2 − 1 − 2/3 = 0
(x + 1)^2 − 5/3 = 0
(x + 1)^2 = 5/3
x + 1 = ±√(5/3)
x = −1 ±√(5/3)
x = −2.291 and 0.291
3x^2 + 6x − 2 = 0
x^2 + 2x − 2/3 = 0
(x + 1)^2 − 1 − 2/3 = 0
(x + 1)^2 − 5/3 = 0
(x + 1)^2 = 5/3
x + 1 = ±√(5/3)
x = −1 ±√(5/3)
x = −2.291 and 0.291
Further examples of solving quadratic equations by completing the square
Sketching a graph by completing the square
By completing the square on a quadratic we can make the quadratic easier to sketch.
Consider our example from earlier: x^2 + 4x + 7 = (x + 2)^2 + 3.
As a square number must be larger or equal to zero, we can quickly see that (x + 2)^2 + 3 ≥ 0 + 3 = 3. The graph y = x^2 + 4x + 7 must therefore have a minimum at y = 3. We get y = 3 by making the bracket (x + 2) equal 0, therefore x = −2 and the minimum is at (−2, 3).
We can also calculate any intersections with the axes by solving for y = 0 or by substituting x = 0 in. This graph does not cross the x-axis as we have already seen that it is always larger than 3, but at x = 0, y = (0 + 2)^2 + 3 = 7, so it must cross the y-axis at 7. Using the minimum and this intersect, along with our knowledge of the shape of quadratic graphs, we can quickly sketch y = x^2 + 4x + 7.
Consider our example from earlier: x^2 + 4x + 7 = (x + 2)^2 + 3.
As a square number must be larger or equal to zero, we can quickly see that (x + 2)^2 + 3 ≥ 0 + 3 = 3. The graph y = x^2 + 4x + 7 must therefore have a minimum at y = 3. We get y = 3 by making the bracket (x + 2) equal 0, therefore x = −2 and the minimum is at (−2, 3).
We can also calculate any intersections with the axes by solving for y = 0 or by substituting x = 0 in. This graph does not cross the x-axis as we have already seen that it is always larger than 3, but at x = 0, y = (0 + 2)^2 + 3 = 7, so it must cross the y-axis at 7. Using the minimum and this intersect, along with our knowledge of the shape of quadratic graphs, we can quickly sketch y = x^2 + 4x + 7.
Completing the square in algebraic proof
Being able to complete the square can also come in very useful for algebraic proof. Consider the following example:
Show that 2x^2 + 6x + k > 0 for all k > 9/2.
If we complete the square first we get:
2x^2 + 6x + k = 2[x^2 + 3x + k/2]
= 2[(x + 3/2)^2 − 9/4 + k/2]
= 2[(x + 3/2)^2 + (2k − 9)/2]
= 2(x + 3/2)^2 + (2k − 9)
(x + 3/2)^2 ≥ 0 as it is a square.
If k > 9/2, then 2k − 9 > 0.
Therefore 2(x + 3/2)2 + (2k − 9) > 0 as required.
Show that 2x^2 + 6x + k > 0 for all k > 9/2.
If we complete the square first we get:
2x^2 + 6x + k = 2[x^2 + 3x + k/2]
= 2[(x + 3/2)^2 − 9/4 + k/2]
= 2[(x + 3/2)^2 + (2k − 9)/2]
= 2(x + 3/2)^2 + (2k − 9)
(x + 3/2)^2 ≥ 0 as it is a square.
If k > 9/2, then 2k − 9 > 0.
Therefore 2(x + 3/2)2 + (2k − 9) > 0 as required.
Comments
Don't forget to leave your comments below.