Lesson Explainer: Completing the Square | Nagwa Lesson Explainer: Completing the Square | Nagwa

Lesson Explainer: Completing the Square Mathematics

Join Nagwa Classes

Attend live Mathematics sessions on Nagwa Classes to learn more about this topic from an expert teacher!

In this explainer, we will learn how to complete the square and use it to solve quadratic equations.

We already know how to factor a quadratic expression into linear factors and how to solve a quadratic equation using the quadratic formula. We will now learn how to solve a quadratic by another method, that is, completing the square.

Consider the expression 𝑥+8𝑥.

Since both terms have a factor of 𝑥, we could immediately factor this as 𝑥+8𝑥=𝑥(𝑥+8); this would give us the solutions to the equation 𝑥+8𝑥=0 as 𝑥=0 and 𝑥=8. However, we are going to do something different. We want to rearrange the expression so that it has only one term containing 𝑥 rather than two. The form we are aiming for is 𝑎(𝑥+𝑏)+𝑐, where 𝑎, 𝑏, and 𝑐 are constants to be determined. To do this, we take the binomial 𝑥+4 and square it: (𝑥+4). If we expand this out, we get (𝑥+4)=𝑥+8𝑥+16.

Notice that the first two terms of this match our starting expression. So, to make it equal, we just need to subtract the constant: (𝑥+4)16=𝑥+8𝑥+1616=𝑥+8𝑥.

How To: Completing the Square for Expressions of the Form 𝑥2 + 𝑏𝑥

To complete the square for expressions of the form 𝑥+𝑏𝑥, we take 𝑥+𝑏2 and subtract the square 𝑏2: 𝑥+𝑏𝑥=𝑥+𝑏2𝑏2.

We have seen algebraically that the expressions 𝑥(𝑥+𝑏)=𝑥+𝑏𝑥=𝑥+𝑏2𝑏2 are equivalent. This is reflected in the geometry, where 𝑥(𝑥+𝑏) represents the area of a rectangle with side lengths 𝑥 and 𝑥+𝑏, while the expression 𝑥+𝑏2𝑏2 represents the area of a square of side length 𝑥+𝑏2 minus the area of a “small” square of side length 𝑏2.

This diagram illustrates the situation when 𝑏>0; a similar diagram can be drawn illustrating the situation when 𝑏<0; try it!

Although factoring 𝑥+𝑏𝑥=𝑥(𝑥+𝑏) is the quickest way to solve equations of the form 𝑥+𝑏𝑥=0, we can also solve them by completing the square. It will be useful to see the procedure here. Suppose we are given 𝑥+8𝑥=0. Then, converting the left-hand expression with two terms containing 𝑥 to an expression with one term containing 𝑥 and a constant term allows us to solve the equation by moving the constant to the right-hand side and extracting the square roots. So, 𝑥+8𝑥=0(𝑥+4)16=0(𝑥+4)=16𝑥+4=±4 yields 𝑥=44=8 or 𝑥=44=0.

Example 1: Writing a Quadratic Expression with No Constant Term in a Given Form by Completing the Square

Given that 𝑥10𝑥=(𝑥+𝑝)+𝑞, what are the values of 𝑝 and 𝑞?

Answer

We want to complete the square on 𝑥10𝑥. To do this, we first halve the coefficient of 𝑥: 102=5. We then write down (𝑥5) minus the square of (5): (𝑥5)(5)=(𝑥5)25.

The values of 𝑝 and 𝑞 are therefore 𝑝=5 and 𝑞=25.

We have seen how to complete the square for quadratics with no constant term and 𝑥-coefficient equal to 1. Let us now look at the case when a constant term is present. Consider the expression 𝑥+12𝑥4.

As before, we first halve the coefficient of 𝑥, 122=6, and consider the expression (𝑥+6): (𝑥+6)=𝑥+12𝑥+36.

We see that the first two terms here match the first two terms of the original quadratic. In order to make the constant terms match, we subtract the “error” of 36=122 and add on the constant term from our original expression: (𝑥+6)36+(4)=𝑥+12𝑥+36364(𝑥+6)40=𝑥+12𝑥4.

How To: Completing the Square for Expressions of the Form 𝑥2 + 𝑏𝑥 + 𝑐

The procedure for completing the square for a quadratic of the form 𝑥+𝑏𝑥+𝑐 is as follows.

  1. Halve the 𝑥-coefficient, 𝑏2.
  2. Write down 𝑥+𝑏2.
  3. Subtract the error 𝑏2.
  4. Add on the constant term 𝑐.

Thus, we have, in general, 𝑥+𝑏𝑥+𝑐=𝑥+𝑏2𝑏2+𝑐.

Example 2: Completing the Square for a Quadratic Expression

Write the equation 𝑥+6𝑥3=0 in completed square form.

Answer

We first halve the 𝑥-coefficient 62=3 and write down (𝑥+3).

We now subtract the error 3=9 and add on the constant term from the original equation, which is 3: (𝑥+3)93=𝑥+6𝑥+993=𝑥+6𝑥3=0.

So, the equation, written in completed square form, is (𝑥+3)12=0.

So, suppose we have a quadratic equation, say, 𝑥+12𝑥4=0.

As mentioned above, we can use the technique of completing the square to solve the equation. First, complete the square: 𝑥+12𝑥4=(𝑥+6)364=(𝑥+6)40.

We can now move the constant term 40 over to the right-hand side, (𝑥+6)40=0(𝑥+6)=40, and take square roots 𝑥+6=±40, giving us the solutions 𝑥=6+40 and 𝑥=640.

The technique of completing the square is particularly useful for solving equations of the form 𝑥+𝑏𝑥=𝑐.

With a bit of practice, you should be able to complete the square on the left-hand side in your head as 𝑥+𝑏2𝑏2 without too much difficulty and then shift the constant over to the right. When the equation is “nice” (which basically means here that 𝑏 is even), this method is usually easier and faster than either factoring or using the quadratic formula.

Example 3: Solving a Quadratic Equation by Completing the Square

By completing the square, solve the equation 𝑥𝑥=34.

Answer

We will complete the square on the left-hand side. The coefficient of 𝑥 is 1, so we halve it and write 𝑥1212=34𝑥1214=34𝑥12=1.

Now, taking the square root of both sides, we get 𝑥12=±1, giving us the solutions of 𝑥=12+1=32 and 𝑥=121=12.

The most general form of a quadratic expression is 𝑎𝑥+𝑏𝑥+𝑐, where the 𝑥-term has a coefficient 𝑎 possibly not equal to 1. The easiest way to complete the square with such an expression is to first factor out the leading coefficient 𝑎 to avoid having to deal with 𝑎 in our expression. We find 𝑎𝑥+𝑏𝑎𝑥+𝑐𝑎 and then complete the square with the contents of the parentheses 𝑥+𝑏𝑎𝑥+𝑐𝑎 as explained above. We have 𝑥+𝑏𝑎𝑥+𝑐𝑎=𝑥+𝑏2𝑎𝑏2𝑎+𝑐𝑎 and 𝑎𝑥+𝑏𝑥+𝑐=𝑎𝑥+𝑏2𝑎𝑏2𝑎+𝑐𝑎.

Example 4: Writing a Quadratic Equation with Variable Coefficients in a Given Form by Completing the Square

Write the equation 3𝑥+𝑏𝑥1=0 in the form (𝑥+𝑝)=𝑞.

Answer

We have here a quadratic polynomial with leading coefficient 3. Since this polynomial appears in the equation 3𝑥+𝑏𝑥1=0, we may first divide both sides by the leading coefficient to reduce it to the case where the leading coefficient is 1: 3𝑥+𝑏𝑥1=0𝑥+𝑏3𝑥13=0.

We now divide the 𝑥-coefficient by two, 𝑏3÷2=𝑏6, and write down 𝑥+𝑏6.

From this expression, we want to subtract the error term 𝑏6=𝑏36 and add on the constant term 13: 𝑥+𝑏6𝑏36+13=𝑥+𝑏6𝑏361236=𝑥+𝑏6𝑏+1236.

We have 𝑥+𝑏6𝑏+1236=0, and so 𝑥+𝑏6=𝑏+1236.

It is important to note that when we are dealing with a quadratic equation, say, 𝑎𝑥+𝑏𝑥+𝑐=0, then the leading factor of 𝑎 in 𝑎𝑥+𝑏𝑎𝑥+𝑐𝑎=0 may simply be discarded at this stage (just divide both sides by 𝑎).

Example 5: Solving a Nonmonic Quadratic Equation by Rearranging and Completing the Square

Solve the equation 15𝑥+103𝑥=0 by completing the square.

Answer

The equation 15𝑥+103𝑥=0 has an 𝑥-coefficient of 3 and is not in the form 𝑎𝑥+𝑏𝑥+𝑐=0, so let us first reorder the terms: 15𝑥+103𝑥=03𝑥+15𝑥+10=0.

Then, we factor out that leading coefficient of 3: 3𝑥+15𝑥+10=03𝑥5𝑥103=0.

Because we are dealing with an equation here, we may at this point divide both sides by 3, leaving us with the equation 𝑥5𝑥103=0 to be solved. Let us complete the square. First we divide the 𝑥-coefficient by 2, 5÷2=52, and write down 𝑥52.

From this, we subtract the error 52=254 and add on the constant term 103: 𝑥5𝑥103=𝑥52254103=0.

Finally, to solve the equation, we move all of the constant terms over to the right-hand side and extract the square roots: 𝑥52254103=0𝑥52=254+103𝑥52=11512𝑥52=±11512, which gives us the solutions of 𝑥=52+11512 and 𝑥=5211512. We can simplify these solutions slightly by rationalizing the denominator of 11512. Observe that 12×3=36 is a perfect square, and so 11512=115×312×3=34536=3456.

Therefore, we give our final answers as 𝑥=52+3456 and 𝑥=523456.

Given a general quadratic equation 𝑎𝑥+𝑏𝑥+𝑐=0, we can write the expression on the left-hand side in completed square form as 𝑎𝑥+𝑏𝑥+𝑐=𝑎𝑥+𝑏2𝑎𝑏2𝑎+𝑐𝑎, for the equation 𝑎𝑥+𝑏2𝑎𝑏2𝑎+𝑐𝑎=0.

Dividing both sides by 𝑎, 𝑥+𝑏2𝑎𝑏2𝑎+𝑐𝑎=0, and moving constant terms to the right-hand side, we have 𝑥+𝑏2𝑎=𝑏2𝑎𝑐𝑎.

Taking square roots, 𝑥+𝑏2𝑎=±𝑏2𝑎𝑐𝑎, and subtracting 𝑏2𝑎 from both sides, we have 𝑥=𝑏2𝑎±𝑏2𝑎𝑐𝑎.

We can simplify the expression under the square root sign: 𝑏2𝑎𝑐𝑎=𝑏4𝑎𝑐𝑎=𝑏4𝑎4𝑎𝑐4𝑎=𝑏4𝑎𝑐4𝑎.

And so 𝑏2𝑎𝑐𝑎=𝑏4𝑎𝑐4𝑎=𝑏4𝑎𝑐2𝑎.

Putting this all together, we have 𝑥=𝑏2𝑎±𝑏2𝑎𝑐𝑎=𝑏2𝑎±𝑏4𝑎𝑐2𝑎=𝑏±𝑏4𝑎𝑐2𝑎, which is nothing other than the familiar quadratic formula.

Let us finish by recapping a few important concepts from this explainer.

Key Points

  • We can put quadratic expressions of the form 𝑥+𝑏𝑥 with no constant term into the completed square form 𝑥+𝑏𝑥=𝑥+𝑏2𝑏2.
  • We can put quadratic expressions of the form 𝑥+𝑏𝑥+𝑐 into the completed square form 𝑥+𝑏𝑥+𝑐=𝑥+𝑏2𝑏2+𝑐.
  • We can put general quadratic expressions 𝑎𝑥+𝑏𝑥+𝑐 into completed square form by first factoring out the leading coefficient 𝑎𝑥+𝑏𝑥+𝑐=𝑎𝑥+𝑏𝑎𝑥+𝑐𝑎 and then completing the square on the contents of the parentheses.
  • We can solve quadratic equations 𝑎𝑥+𝑏𝑥+𝑐=0 by first dividing both sides by 𝑎 to get a quadratic with leading coefficient 1 on the left-hand side, 𝑥+𝑏𝑎𝑥+𝑐𝑎=0, and then completing the square: 𝑥+𝑏2𝑎𝑏2𝑎+𝑐𝑎=0. Finally, we move all the constant terms to the right-hand side and take square roots, 𝑥+𝑏2𝑎=𝑏2𝑎𝑐𝑎𝑥+𝑏2𝑎=±𝑏2𝑎𝑐𝑎, to get the solutions 𝑥=𝑏2𝑎±𝑏2𝑎𝑐𝑎=𝑏±𝑏4𝑎𝑐2𝑎.

Join Nagwa Classes

Attend live sessions on Nagwa Classes to boost your learning with guidance and advice from an expert teacher!

  • Interactive Sessions
  • Chat & Messaging
  • Realistic Exam Questions

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