Lesson 7 · Word problems related to quadratic equation

Solving Quadratic Equation by Completing Square

MathematicsSubject
8 minEstimated read

When a Square Equals a Number

A quadratic equation is an equation in which the highest power of the variable is 2, such as \( x^2 - 9 = 0 \). Its roots are the values of \( x \) that make the equation true. The simplest quadratic equations have a square on one side and a number on the other. Take \( x^2 - 9 = 0 \). It can be solved in two ways, and the second way is the idea this whole method is built on.

First way, by factorising. Since \( 9 = 3^2 \), the left side is a difference of two squares:

\[ x^2 - 3^2 = 0 \]

Using \( a^2 - b^2 = (a + b)(a - b) \), the left side factorises:

\[ (x + 3)(x - 3) = 0 \]

A product is zero only when one of its factors is zero. Either \( x + 3 = 0 \), so \( x = -3 \), or \( x - 3 = 0 \), so \( x = 3 \). Both roots written together:

\[ \therefore x = \pm 3 \]

Second way, by taking the square root. Moving 9 to the right side:

\[ x^2 = 9 \]

Both \( x^2 \) and 9 are squares, so 9 is written as \( 3^2 \):

\[ x^2 = 3^2 \]

Two numbers have 9 as their square, because \( 3 \times 3 = 9 \) and \( (-3) \times (-3) = 9 \). So \( x \) can be either of them:

\[ x = \pm 3 \]

Key idea

If \( x^2 = a^2 \), then \( x = \pm a \). The sign \( \pm \) is read "plus or minus". It stands for two roots at once: \( x = a \) and \( x = -a \).

Common mistake

Writing only \( x = 3 \) after taking the square root loses half of the answer. A square root taken while solving an equation always carries \( \pm \).

The second way is quick, but it works directly only when one side is a perfect square and the other side is a number. Most quadratic equations, such as \( x^2 - 5x + 6 = 0 \), are not in that shape. The method that puts them into that shape is called completing the square.

Perfect Squares and the Missing Term

The whole method rests on two identities you already know:

\[ (a + b)^2 = a^2 + 2ab + b^2 \]

\[ (a - b)^2 = a^2 - 2ab + b^2 \]

Definition

Perfect square: an expression that is equal to the square of another expression. For example, \( x^2 - 10x + 25 \) is a perfect square because it equals \( (x - 5)^2 \).

Put \( x^2 - 10x + 25 \) beside \( a^2 - 2ab + b^2 \). Here \( a \) is \( x \). The middle term \( 10x \) is \( 2 \times x \times 5 \), so \( b = 5 \), and 5 is half of 10, the coefficient of \( x \). The last term is \( b^2 = 25 \). So in a perfect square whose first term is \( x^2 \), the last term is always the square of half the coefficient of \( x \).

Now suppose only \( x^2 + 6x \) is given. Half of 6 is 3, and \( 3^2 = 9 \). Adding 9 gives \( x^2 + 6x + 9 \), which is \( (x + 3)^2 \). An area picture shows why this is called completing the square.

Key idea

To make \( x^2 + px \) or \( x^2 - px \) a perfect square, add \( \left(\frac{p}{2}\right)^2 \), the square of half the coefficient of \( x \).

ExpressionHalf the coefficient of xNumber to addPerfect square
\( x^2 + 6x \)39\( (x + 3)^2 \)
\( x^2 - 10x \)525\( (x - 5)^2 \)
\( x^2 - 5x \)\( \frac{5}{2} \)\( \frac{25}{4} \)\( \left(x - \frac{5}{2}\right)^2 \)
\( x^2 - 7x \)\( \frac{7}{2} \)\( \frac{49}{4} \)\( \left(x - \frac{7}{2}\right)^2 \)

The sign inside the bracket follows the sign of the middle term. A minus middle term gives \( (x - \ldots)^2 \) and a plus middle term gives \( (x + \ldots)^2 \). The number added is always positive, because it is a square.

The Method of Completing the Square

Definition

Completing the square: a method of solving a quadratic equation by adding the square of half the coefficient of \( x \), so that the terms in \( x \) form a perfect square, and then taking the square root.

The method uses the same moves every time:

  • Make the coefficient of \( x^2 \) equal to 1. If it is not 1, divide every term of the equation by it.
  • Find half of the coefficient of \( x \) and square it.
  • Add that square to make the \( x \) terms a perfect square. Keep the equation balanced by subtracting the same square on the same side, or by adding it to the other side as well.
  • Write the perfect square as a bracket squared, and collect all the plain numbers on the right side.
  • Write the right side as a square, then take the square root of both sides, putting \( \pm \) on the right.
  • Take the positive sign and the negative sign one at a time to find the two roots.

There are two ways to keep the balance. One is to move the constant term to the right side first and add the square to both sides. The other is to add and subtract the square on the left side, which adds zero in total. Both give the same roots.

Keep the balance

Adding a number to one side only changes the equation, and the roots you find will be wrong. Whatever is added must be subtracted on the same side, or added to the other side too.

Solving by Moving the Constant First

Solve \( x^2 - 5x + 6 = 0 \) by completing the square.

Step 1: Moving the constant term 6 to the right side:

\[ x^2 - 5x = -6 \]

Step 2: Half of 5 is \( \frac{5}{2} \), so \( 5x \) is written as \( 2 \cdot \frac{5}{2} \cdot x \). Adding \( \left(\frac{5}{2}\right)^2 \) to both sides:

\[ \begin{aligned} &x^2 - 2 \cdot \tfrac{5}{2} \cdot x + \left(\tfrac{5}{2}\right)^2 \\ &= \left(\tfrac{5}{2}\right)^2 - 6 \end{aligned} \]

Step 3: The left side matches \( a^2 - 2ab + b^2 \) with \( a = x \) and \( b = \frac{5}{2} \), so it becomes \( \left(x - \frac{5}{2}\right)^2 \). Putting \( \left(\frac{5}{2}\right)^2 = \frac{25}{4} \) on the right:

\[ \left(x - \frac{5}{2}\right)^2 = \frac{25}{4} - 6 \]

Step 4: Writing 6 as \( \frac{24}{4} \) and subtracting:

\[ \left(x - \frac{5}{2}\right)^2 = \frac{25 - 24}{4} = \frac{1}{4} \]

Step 5: Writing \( \frac{1}{4} \) as the square of \( \frac{1}{2} \):

\[ \left(x - \frac{5}{2}\right)^2 = \left(\frac{1}{2}\right)^2 \]

Step 6: Taking the square root of both sides, using \( x^2 = a^2 \Rightarrow x = \pm a \):

\[ x - \frac{5}{2} = \pm \frac{1}{2} \]

Step 7: Taking the (+)ve sign, \( x - \frac{5}{2} = \frac{1}{2} \), so:

\[ x = \frac{1}{2} + \frac{5}{2} = \frac{6}{2} = 3 \]

Step 8: Taking the (-)ve sign, \( x - \frac{5}{2} = -\frac{1}{2} \), so:

\[ x = \frac{5}{2} - \frac{1}{2} = \frac{4}{2} = 2 \]

Therefore the roots of \( x^2 - 5x + 6 = 0 \) are 2 and 3. Factorising gives \( (x - 2)(x - 3) = 0 \) and the same two roots, so the two methods agree.

Solving by Adding and Subtracting the Square

Solve \( x^2 - 10x + 16 = 0 \) by completing the square. This time the constant stays on the left, and the square is added and subtracted on the same side.

Step 1: Half of 10 is 5, so \( 10x \) is written as \( 2 \times x \times 5 \). Adding and subtracting \( 5^2 \), which adds zero in total:

\[ \begin{aligned} &x^2 - 2 \times x \times 5 + 5^2 \\ &- 5^2 + 16 = 0 \end{aligned} \]

Step 2: The first three terms form \( (x - 5)^2 \), and \( 5^2 = 25 \):

\[ (x - 5)^2 - 25 + 16 = 0 \]

Step 3: Simplifying the numbers, since \( -25 + 16 = -9 \):

\[ (x - 5)^2 - 9 = 0 \]

Step 4: Moving 9 to the right side and writing it as \( 3^2 \):

\[ (x - 5)^2 = 3^2 \]

Step 5: Taking the square root of both sides:

\[ x - 5 = \pm 3 \]

Step 6: Taking the (+)ve sign, \( x - 5 = 3 \), so:

\[ x = 3 + 5 = 8 \]

Step 7: Taking the (-)ve sign, \( x - 5 = -3 \), so:

\[ x = 5 - 3 = 2 \]

Therefore \( x = 8, 2 \).

When Half the Coefficient Is a Fraction

Solve \( x^2 - 7x + 12 = 0 \). The coefficient of \( x \) is 7, an odd number, so half of it is the fraction \( \frac{7}{2} \). The method does not change. Only the arithmetic uses fractions.

Step 1: Writing \( 7x \) as \( 2 \cdot \frac{7}{2} \cdot x \), and adding and subtracting \( \left(\frac{7}{2}\right)^2 \):

\[ \begin{aligned} &x^2 - 2 \cdot \tfrac{7}{2} \cdot x + \left(\tfrac{7}{2}\right)^2 \\ &+ 12 - \left(\tfrac{7}{2}\right)^2 = 0 \end{aligned} \]

Step 2: The first three terms form \( \left(x - \frac{7}{2}\right)^2 \), and \( \left(\frac{7}{2}\right)^2 = \frac{49}{4} \):

\[ \left(x - \frac{7}{2}\right)^2 + 12 - \frac{49}{4} = 0 \]

Step 3: Writing 12 as \( \frac{48}{4} \) so both numbers have the same denominator:

\[ \left(x - \frac{7}{2}\right)^2 + \frac{48 - 49}{4} = 0 \]

Step 4: Since \( 48 - 49 = -1 \):

\[ \left(x - \frac{7}{2}\right)^2 - \frac{1}{4} = 0 \]

Step 5: Moving \( \frac{1}{4} \) to the right and writing it as \( \left(\frac{1}{2}\right)^2 \):

\[ \left(x - \frac{7}{2}\right)^2 = \left(\frac{1}{2}\right)^2 \]

Step 6: Taking the square root of both sides:

\[ x - \frac{7}{2} = \pm \frac{1}{2} \]

Step 7: Taking the (+)ve sign:

\[ x = \frac{7}{2} + \frac{1}{2} = \frac{8}{2} = 4 \]

Step 8: Taking the (-)ve sign:

\[ x = \frac{7}{2} - \frac{1}{2} = \frac{6}{2} = 3 \]

Therefore \( x = 4, 3 \).

When the Coefficient of x² Is Not 1

In \( 2x^2 - 7x + 6 = 0 \), the coefficient of \( x^2 \) is 2. The identity \( (a - b)^2 = a^2 - 2ab + b^2 \) starts with \( a^2 \), whose coefficient is 1. So the \( x^2 \) term must have coefficient 1 before the square can be completed, and that is why the first move is to divide by 2.

Step 1: Taking out 2 as a common factor:

\[ 2\left(x^2 - \frac{7}{2}x + 3\right) = 0 \]

Step 2: Dividing both sides by 2, since \( 0 \div 2 = 0 \):

\[ x^2 - \frac{7}{2}x + 3 = 0 \]

Step 3: The coefficient of \( x \) is now \( \frac{7}{2} \), and half of it is \( \frac{7}{4} \). Writing the middle term with \( 2 \times x \times \frac{7}{4} \), and adding and subtracting \( \left(\frac{7}{4}\right)^2 \):

\[ \begin{aligned} &x^2 - 2 \times x \times \tfrac{7}{4} + \left(\tfrac{7}{4}\right)^2 \\ &- \left(\tfrac{7}{4}\right)^2 + 3 = 0 \end{aligned} \]

Step 4: The first three terms form \( \left(x - \frac{7}{4}\right)^2 \), and \( \left(\frac{7}{4}\right)^2 = \frac{49}{16} \):

\[ \left(x - \frac{7}{4}\right)^2 + 3 - \frac{49}{16} = 0 \]

Step 5: Writing 3 as \( \frac{48}{16} \), and since \( \frac{48}{16} - \frac{49}{16} = -\frac{1}{16} \):

\[ \left(x - \frac{7}{4}\right)^2 - \frac{1}{16} = 0 \]

Step 6: Moving \( \frac{1}{16} \) to the right and writing it as \( \left(\frac{1}{4}\right)^2 \):

\[ \left(x - \frac{7}{4}\right)^2 = \left(\frac{1}{4}\right)^2 \]

Step 7: Taking the square root of both sides:

\[ x - \frac{7}{4} = \pm \frac{1}{4} \]

Step 8: Taking the (+)ve sign:

\[ x = \frac{7}{4} + \frac{1}{4} = \frac{8}{4} = 2 \]

Step 9: Taking the (-)ve sign:

\[ x = \frac{7}{4} - \frac{1}{4} = \frac{6}{4} = \frac{3}{2} \]

Therefore \( x = 2, \frac{3}{2} \).

Common mistake

Divide every term by the coefficient of \( x^2 \), not only the \( x^2 \) term. Halve carefully too: half of \( \frac{7}{2} \) is \( \frac{7}{4} \), because halving a fraction doubles its denominator.

When the Middle Term Is Positive

In every equation so far the middle term had a minus sign, so \( (a - b)^2 \) was used. When the middle term is positive, the same method uses \( (a + b)^2 = a^2 + 2ab + b^2 \) instead. Solve \( x^2 + 6x + 5 = 0 \).

Step 1: Half of 6 is 3, so \( 6x \) is written as \( 2 \times x \times 3 \). Adding and subtracting \( 3^2 \):

\[ \begin{aligned} &x^2 + 2 \times x \times 3 + 3^2 \\ &- 3^2 + 5 = 0 \end{aligned} \]

Step 2: The first three terms form \( (x + 3)^2 \), and \( 3^2 = 9 \):

\[ (x + 3)^2 - 9 + 5 = 0 \]

Step 3: Since \( -9 + 5 = -4 \), moving 4 to the right and writing it as \( 2^2 \):

\[ (x + 3)^2 = 2^2 \]

Step 4: Taking the square root of both sides:

\[ x + 3 = \pm 2 \]

Step 5: Taking the (+)ve sign, \( x + 3 = 2 \), so:

\[ x = 2 - 3 = -1 \]

Step 6: Taking the (-)ve sign, \( x + 3 = -2 \), so:

\[ x = -2 - 3 = -5 \]

Therefore \( x = -1, -5 \). The 9 added here is exactly the missing 3 by 3 corner in the area picture, the piece that completes the square of side \( x + 3 \).

Checking the Roots

A root is correct when it makes the left side of the original equation equal to the right side. Check \( x = \frac{3}{2} \) in \( 2x^2 - 7x + 6 = 0 \).

Step 1: Putting \( x = \frac{3}{2} \) in the left side:

\[ \text{LHS} = 2\left(\frac{3}{2}\right)^2 - 7 \times \frac{3}{2} + 6 \]

Step 2: Since \( 2 \times \frac{9}{4} = \frac{9}{2} \) and \( 7 \times \frac{3}{2} = \frac{21}{2} \):

\[ = \frac{9}{2} - \frac{21}{2} + 6 \]

Step 3: Writing 6 as \( \frac{12}{2} \) and adding over one denominator:

\[ = \frac{9 - 21 + 12}{2} = \frac{0}{2} = 0 = \text{RHS} \]

Putting \( x = 2 \) works the same way: \( 2(2)^2 - 7 \times 2 + 6 = 8 - 14 + 6 = 0 \). Both values make the equation true, so \( x = 2, \frac{3}{2} \) is correct. A short check like this catches an arithmetic slip before it costs marks.

🔐

The full lesson is waiting for you

The notes are free to read in full. A free account opens the rest of the practice, and tracks your progress and confidence score for every subject. Presentations and videos need approval from Learn Yeti.