Explainer: Completing the Square

In this explainer, we will learn how to complete the square to factor and solve quadratic expressions.

When working with quadratic expressions, a very useful skill to master is the ability to complete the square. This method allows us to solve quadratic equations and identify the coordinates and nature of the vertex of a quadratic, and it ultimately gives us the ability to derive the quadratic formula.

Explained simply, the method involves starting with a quadratic expression, finding the square of a related binomial, and then adjusting the constant to make the two expressions equivalent (hence, completing the square).

When learning the technique of completing the square, it is useful to start with quadratics where the leading coefficient is one (monic quadratics). Before looking at the method of completing the square, we will start by introducing what are called perfect square binomials.

Consider the expression (π‘₯+2)2.

This is called a perfect square binomial. If we expand this expression, we get (π‘₯+2)2=(π‘₯+2)(π‘₯+2)=π‘₯2+2π‘₯+2π‘₯+4=π‘₯2+4π‘₯+4.

The result π‘₯2+4π‘₯+4 is a quadratic that is a perfect square. Another example would be (π‘₯+5)2=π‘₯2+10π‘₯+25.

Notice in both cases that the constant in the binomial is half the coefficient of the π‘₯ term in the resulting quadratic. We can use this result to help us complete the square.

Let us consider the quadratic expression π‘₯2+4π‘₯βˆ’7.

The coefficient of π‘₯ is 4, so we need to to consider the perfect square binomial (π‘₯+2)2 which we have already seen expand to π‘₯2+4π‘₯+4.

If we then compare the two qudratics, we can see that π‘₯2+4π‘₯βˆ’7=ο€Ήπ‘₯2+4π‘₯+4ο…βˆ’4βˆ’7=(π‘₯+2)2βˆ’11.

This comparison method is one way in which we can complete the square, and it is certainly a useful approach to help us understand the method. We can generalize this method for completing the square for a monic quadratic in the following way. For a quadratic in the form π‘₯2+𝑏π‘₯+𝑐, the formula to complete the square is ο€½π‘₯+𝑏22βˆ’ο€½π‘22+𝑐.

This is a direct result of the method that we have outlined above. As an additional exercise, it is certainly worth completing the square for a monic quadratic using both methods. Now, let us look at a couple of examples of completing the square for monic quadratics.

Example 1: Completing the Square for a Monic Quadratic

Given that π‘₯2+2π‘₯+5=(π‘₯+𝑝)2+π‘ž, what are the values of 𝑝and π‘ž?

Answer

Given that the coefficient of the leading term of the quadratic is one (it is monic), we can use the formula ο€½π‘₯+𝑏22βˆ’ο€½π‘22+𝑐 to complete the square. In this case, 𝑏=2 and 𝑐=5. Therefore, substituting into the formula, we get (π‘₯+1)2βˆ’(1)2+5 which simplifies to (π‘₯+1)2+4.

This gives us 𝑝=1 and π‘ž=4.

Let us also have a look at a second example of this but this time present our solution by comparing the expansion with the original quadratic.

Example 2: Completing the Square for a Monic Quadratic

Given that π‘₯2βˆ’10π‘₯=(π‘₯+𝑝)2+π‘ž, what are the values of 𝑝 and π‘ž?

Answer

As the coefficient of the leading term of the quadratic is one, we need to find a perfect square binomial in the form (π‘₯+𝑝)2 with which we can compare our original quadratic. The general result is that the value of 𝑝 is always equal to half the coefficient of π‘₯ in the original quadratic. Therefore, our perfect square binomial is (π‘₯βˆ’5)2.

If we expand this expression, we get π‘₯2βˆ’10π‘₯+25.

If we compare this to our original quadratic, we can see that π‘₯2βˆ’10π‘₯=ο€Ήπ‘₯2βˆ’10π‘₯+25ο…βˆ’25=(π‘₯βˆ’5)2βˆ’25.

From here, we can see that 𝑝=βˆ’5 and π‘ž=βˆ’25.

Now, let us move on to looking at how to complete the square for quadratics where the coefficient of the leading term is not equal to one (nonmonic). There are two fairly standard approaches for doing this and we will explore both.

If we start by considering the quadratic 4π‘₯2+8π‘₯βˆ’15, our first approach is to factor the 4 from each of the terms: 4ο€Όπ‘₯2+2π‘₯+154.

Note here that it is usually easier to work with fractions rather than decimals with these calculations. Once we have the factored form of the quadratic, we can complete the square for the resulting monic quadratic: 4ο€Όπ‘₯2+2π‘₯βˆ’154=4ο€Ό(π‘₯+1)2βˆ’(1)2βˆ’154=4ο€Ό(π‘₯+1)2βˆ’44βˆ’154=4ο€Ό(π‘₯+1)2βˆ’194.

At this point, we can then expand the 4 to get 4(π‘₯+1)2βˆ’19.

This is our first method for completing the square for nonmonic quadratics. Our second method involves only factoring the 4 from the terms containing the variable π‘₯; that is, 4ο€Ήπ‘₯2+2π‘₯ο…βˆ’15.

At this point, we can complete the square for the expression in the parentheses: 4ο€Ήπ‘₯2+2π‘₯ο…βˆ’15=4ο€Ί(π‘₯+1)2βˆ’(1)2ο†βˆ’15=4ο€Ί(π‘₯+1)2βˆ’1ο†βˆ’15.

We now need to expand the parentheses and simplify the resulting expression: 4ο€Ί(π‘₯+1)2βˆ’1ο†βˆ’15=4(π‘₯+1)2βˆ’4βˆ’15=4(π‘₯+1)2βˆ’19.

Both methods produce the same result, but the second is generally easier to use.

Let us now have a look at some examples demonstrating how to complete the square for nonmonic quadratics.

Example 3: Completing the Square for a Nonmonic Quadratic

Given that 3π‘₯2+3π‘₯+5=π‘Ž(π‘₯+𝑝)2+π‘ž, what are the values of π‘Ž, 𝑝, and π‘ž?

Answer

As the coefficient of the π‘₯2 term is not one, we need to start by factoring this out of the first two terms of the expression: 3ο€Ήπ‘₯2+π‘₯+5.

If we then complete the square for the expression inside the parentheses, we get 3ο€Ήπ‘₯2+π‘₯+5=3ο€Ύο€Όπ‘₯+122βˆ’ο€Ό122+5=3ο€Ύο€Όπ‘₯+122βˆ’14+5.

If we then expand the parentheses and simplify, we get 3ο€Ύο€Όπ‘₯+122βˆ’14+5=3ο€Όπ‘₯+122βˆ’34+5=3ο€Όπ‘₯+122βˆ’34+204=3ο€Όπ‘₯+122+174.

Therefore, π‘Ž=3, 𝑝=12, and π‘ž=174.

Example 4: Completing the Square for a Nonmonic Quadratic

Given that βˆ’π‘₯2+3π‘₯+4=π‘Ž(π‘₯+𝑝)2+π‘ž, what are the values of π‘Ž, 𝑝, and π‘ž?

Answer

Our first step is to factor βˆ’ from the first two terms of the quadratic: βˆ’ο€Ήπ‘₯2βˆ’3π‘₯+4.

If we then complete the square for the quadratic inside the parentheses, we get βˆ’ο€Ήπ‘₯2βˆ’3π‘₯+4=βˆ’ο€Ύο€Όπ‘₯βˆ’322βˆ’ο€Όβˆ’322+4=βˆ’ο€Ύο€Όπ‘₯βˆ’322βˆ’94+4.

If we then expand the parentheses and simplify, we get βˆ’ο€Ύο€Όπ‘₯βˆ’322βˆ’94+4=βˆ’ο€Όπ‘₯βˆ’322+94+4=βˆ’ο€Όπ‘₯βˆ’322+94+164=βˆ’ο€Όπ‘₯βˆ’322+254.

As mentioned at the start, we can use the method of completing the square to identify the coordinates of the vertex of a quadratic. For this reason, the form of the quadratic obtained after completing the square is often called the vertex form. If we look at a previous example, we have that π‘₯2+4π‘₯βˆ’7=(π‘₯+2)2βˆ’11.

To find the coordinates of the vertex, once we have the quadratic in vertex form, we need to use the equation to determine when the quadratic takes its minimum (or sometimes maximum) value. We can see from this example that the minimum value of the quadratic will be βˆ’11, as for all other values of π‘₯ we will be adding a square number which is always positive. This minimum value will occur when the square is minimum, that is, equal to zero. This will happen precisely when π‘₯=βˆ’2. Therefore, the coordinates of the vertex are (βˆ’2,βˆ’11).

Let us finish by looking at two more examples where we are asked to convert a quadratic into vertex form.

Example 5: Converting a Quadratic into Vertex Form

What is the vertex form of the function 𝑓(π‘₯)=βˆ’π‘₯2+6π‘₯+5?

Answer

To start, we need to factor the βˆ’1 from the first two terms of the quadratic to get βˆ’ο€Ήπ‘₯2βˆ’6π‘₯+5.

Once we have done this, we can complete the square for the quadratic inside the parentheses: βˆ’ο€Ήπ‘₯2βˆ’6π‘₯+5=βˆ’ο€Ί(π‘₯βˆ’3)2βˆ’(βˆ’3)2+5=βˆ’ο€Ί(π‘₯βˆ’3)2βˆ’9+5.

If we then expand the parentheses and simplify we get βˆ’ο€Ί(π‘₯βˆ’3)2βˆ’9+5=βˆ’(π‘₯βˆ’3)2+9+5=βˆ’(π‘₯βˆ’3)2+14.

As a piece of additional information, the vertex of the quadratic will have the coordinates (3,14) where the maximum value of the quadratic is 14.

Example 6: Converting a Quadratic into Vertex Form

What is the vertex form of the function 𝑓(π‘₯)=5π‘₯2βˆ’π‘₯+1?

Answer

To start, we need to factor the 5 from the first two terms of the quadratic to get 5ο€»π‘₯2βˆ’π‘₯5+1.

Once we have done this, we can complete the square for the quadratic inside the parentheses: 5ο€»π‘₯2βˆ’π‘₯5+1=5ο€Ύο€Όπ‘₯βˆ’1102βˆ’ο€Όβˆ’1102+1=5ο€Ύο€Όπ‘₯βˆ’1102βˆ’1100+1.

If we then expand the parentheses and simplify, we get 5ο€Ύο€Όπ‘₯βˆ’1102βˆ’1100+1=5ο€Όπ‘₯βˆ’1102βˆ’120+1=5ο€Όπ‘₯βˆ’1102βˆ’120+2020=5ο€Όπ‘₯βˆ’1102+1920.

As a piece of additional information, the vertex of the quadratic will have the coordinates ο€Ό110,1920 where the minimum value of the quadratic is 1920.

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.