The Central Idea

A quadratic expression such as

\[ x^2+6x+5 \]

does not initially contain an obvious squared binomial.

But we can rewrite part of it:

\[ x^2+6x+9=(x+3)^2. \]

Since the original expression has \(5\), not \(9\), we compensate by subtracting \(4\):

\[ x^2+6x+5 = x^2+6x+9-4. \]

Therefore,

\[ x^2+6x+5 = (x+3)^2-4. \]

The expression has changed form, but not value. This process is called completing the square.

Perfect Square Trinomials

Completing the square is based on two identities:

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

and

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

For example,

\[ (x+4)^2 = x^2+8x+16. \]

Likewise,

\[ (x-5)^2 = x^2-10x+25. \]

A quadratic trinomial that matches one of these patterns is called a perfect square trinomial.

The Missing Number

Suppose we begin with

\[ x^2+8x. \]

We want to add a number that makes this into a perfect square trinomial.

Compare

\[ (x+a)^2=x^2+2ax+a^2. \]

The middle coefficient is \(2a\).

Since

\[ 2a=8, \]

we get

\[ a=4. \]

So the needed constant is

\[ a^2=16. \]

Therefore,

\[ x^2+8x+16=(x+4)^2. \]

The Half-and-Square Rule

For an expression of the form

\[ x^2+bx, \]

the number needed to complete the square is

\[ \left(\frac{b}{2}\right)^2. \]

So

\[ x^2+bx+\left(\frac{b}{2}\right)^2 = \left(x+\frac{b}{2}\right)^2. \]

This gives a reliable procedure:

  1. Take the coefficient of \(x\).
  2. Divide it by \(2\).
  3. Square the result.

That number completes the square.

Example: Positive Middle Term

Complete the square for

\[ x^2+10x. \]

Half of \(10\) is

\[ 5. \]

Square it:

\[ 5^2=25. \]

Therefore,

\[ x^2+10x+25=(x+5)^2. \]

Example: Negative Middle Term

Complete the square for

\[ x^2-12x. \]

Half of \(-12\) is

\[ -6. \]

Square it:

\[ (-6)^2=36. \]

Therefore,

\[ x^2-12x+36=(x-6)^2. \]

The sign inside the squared binomial comes from the half-value before it is squared.

Rewriting a Quadratic Expression

Consider

\[ x^2+8x+3. \]

To create a perfect square, add and subtract \(16\):

\[ x^2+8x+16-16+3. \]

Group the perfect square:

\[ (x+4)^2-13. \]

Thus,

\[ x^2+8x+3=(x+4)^2-13. \]

Adding and subtracting the same quantity preserves the value of the expression.

Why We Add and Subtract the Same Number

Suppose we change

\[ x^2+6x+2 \]

into

\[ x^2+6x+9. \]

That would change the value of the expression by \(7\).

To preserve equivalence, we must compensate:

\[ x^2+6x+2 = x^2+6x+9-7. \]

Then

\[ x^2+6x+2 = (x+3)^2-7. \]

Completing the square is therefore a controlled replacement: we create a useful pattern and then correct for what we added.

Completing the Square in an Equation

When solving an equation, there is another way to preserve equality: add the same quantity to both sides.

Consider

\[ x^2+6x=7. \]

Half of \(6\) is \(3\), and

\[ 3^2=9. \]

Add \(9\) to both sides:

\[ x^2+6x+9=16. \]

The left side factors:

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

Then

\[ x+3=\pm4. \]

So

\[ x=1 \]

or

\[ x=-7. \]

Why the \(\pm\) Appears

From

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

the quantity \(x+3\) could be either \(4\) or \(-4\), because both satisfy the equation:

\[ 4^2=16 \]

and

\[ (-4)^2=16. \]

So taking square roots while solving an equation gives

\[ x+3=\pm4. \]

This differs from evaluating the principal square root

\[ \sqrt{16}=4. \]

The equation has two possible signed values whose squares equal \(16\).

Moving the Constant First

When solving a quadratic equation by completing the square, it is often easiest to isolate the quadratic and linear terms first.

Consider

\[ x^2+4x-5=0. \]

Add \(5\) to both sides:

\[ x^2+4x=5. \]

Now complete the square.

Half of \(4\) is \(2\), and

\[ 2^2=4. \]

Add \(4\) to both sides:

\[ x^2+4x+4=9. \]

Then

\[ (x+2)^2=9. \]

So

\[ x+2=\pm3, \]

giving

\[ x=1 \]

or

\[ x=-5. \]

When the Leading Coefficient Is Not 1

Completing the square is simplest when the coefficient of \(x^2\) is \(1\).

Consider

\[ 2x^2+8x+3. \]

Factor \(2\) from the quadratic and linear terms:

\[ 2(x^2+4x)+3. \]

Complete the square inside the parentheses.

Half of \(4\) is \(2\), and \(2^2=4\):

\[ 2(x^2+4x+4-4)+3. \]

Group:

\[ 2[(x+2)^2-4]+3. \]

Distribute:

\[ 2(x+2)^2-8+3. \]

Therefore,

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

General Quadratic Form

A general quadratic expression has the form

\[ ax^2+bx+c, \qquad a\ne0. \]

Factor \(a\) from the terms containing \(x\):

\[ a\left(x^2+\frac{b}{a}x\right)+c. \]

Half of the coefficient of \(x\) inside the parentheses is

\[ \frac{b}{2a}. \]

Its square is

\[ \frac{b^2}{4a^2}. \]

So

\[ ax^2+bx+c = a\left(x+\frac{b}{2a}\right)^2 + c-\frac{b^2}{4a}. \]

This is the general completed-square form of a quadratic expression.

Standard Form and Vertex Form

A quadratic function is often written in standard form:

\[ y=ax^2+bx+c. \]

Completing the square converts it into vertex form:

\[ y=a(x-h)^2+k. \]

The vertex is

\[ (h,k). \]

Because a squared quantity is easy to interpret geometrically, vertex form often reveals the graph more clearly than expanded form.

Example: Finding the Vertex by Completing the Square

Consider

\[ y=x^2-6x+11. \]

Complete the square:

\[ y=x^2-6x+9+2. \]

Therefore,

\[ y=(x-3)^2+2. \]

The vertex is

\[ (3,2). \]

The expanded form made the coefficients easy to see. The completed-square form makes the graph's location easy to see.

Minimum and Maximum Values

Completed-square form can reveal an extremum immediately.

Suppose

\[ y=(x-4)^2+7. \]

Since

\[ (x-4)^2\ge0, \]

the smallest possible value of \(y\) is

\[ 7, \]

which occurs when

\[ x=4. \]

If instead

\[ y=-2(x+1)^2+5, \]

then

\[ -2(x+1)^2\le0, \]

so the maximum value is

\[ 5, \]

occurring when

\[ x=-1. \]

Completing the Square and Symmetry

For

\[ y=a(x-h)^2+k, \]

the graph is symmetric about the vertical line

\[ x=h. \]

Completing the square therefore exposes the axis of symmetry.

For the standard quadratic

\[ y=ax^2+bx+c, \]

the completed-square formula shows that

\[ h=-\frac{b}{2a}. \]

So the axis of symmetry is

\[ x=-\frac{b}{2a}. \]

Geometric Interpretation

The phrase completing the square has a literal geometric interpretation.

Consider

\[ x^2+6x. \]

Imagine an \(x\times x\) square with area

\[ x^2. \]

The term \(6x\) can be split into two rectangles of area \(3x\):

\[ 6x=3x+3x. \]

Placing one rectangle along each side leaves a missing corner that is a \(3\times3\) square.

Its area is

\[ 9. \]

Adding that missing area creates a complete square:

\[ x^2+6x+9=(x+3)^2. \]

The algebraic half-and-square rule comes directly from this geometry.

Completing the Square Versus Factoring

Factoring and completing the square are both equivalence transformations, but they reveal different structure.

For example,

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

factors as

\[ (x-2)(x-3), \]

which makes the zeros visible.

Completing the square gives

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

which makes the vertex and axis of symmetry visible.

The preferred form depends on the question being asked.

Completing the Square When Factoring Is Difficult

Some quadratics do not factor conveniently over the integers.

Consider

\[ x^2+4x+1=0. \]

Move the constant:

\[ x^2+4x=-1. \]

Add \(4\) to both sides:

\[ x^2+4x+4=3. \]

Then

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

So

\[ x+2=\pm\sqrt{3}, \]

and

\[ x=-2\pm\sqrt{3}. \]

Completing the square works even when simple integer factoring does not.

Deriving the Quadratic Formula

The quadratic formula can be derived by completing the square on the general equation

\[ ax^2+bx+c=0, \qquad a\ne0. \]

Divide by \(a\):

\[ x^2+\frac{b}{a}x+\frac{c}{a}=0. \]

Move the constant term:

\[ x^2+\frac{b}{a}x=-\frac{c}{a}. \]

Add

\[ \left(\frac{b}{2a}\right)^2 = \frac{b^2}{4a^2} \]

to both sides:

\[ x^2+\frac{b}{a}x+\frac{b^2}{4a^2} = -\frac{c}{a}+\frac{b^2}{4a^2}. \]

The left side becomes

\[ \left(x+\frac{b}{2a}\right)^2. \]

The right side becomes

\[ \frac{b^2-4ac}{4a^2}. \]

So

\[ \left(x+\frac{b}{2a}\right)^2 = \frac{b^2-4ac}{4a^2}. \]

Taking square roots gives

\[ x+\frac{b}{2a} = \pm \frac{\sqrt{b^2-4ac}}{2a}. \]

Therefore,

\[ x= \frac{-b\pm\sqrt{b^2-4ac}}{2a}. \]

The quadratic formula is thus a general completed-square solution.

The Discriminant Appears Naturally

During the derivation, the expression

\[ b^2-4ac \]

appears under the square root.

This quantity is called the discriminant.

Its sign determines the nature of the real solutions:

Completing the square therefore connects symbolic transformation directly to the solution structure of quadratics.

A Strategic View

Completing the square is useful when we want to:

It is one more example of a recurring algebraic principle: choose the equivalent form that exposes the structure you need.

Worked Example: Rewrite in Vertex Form

Rewrite

\[ y=x^2+10x+21 \]

in vertex form.

Half of \(10\) is \(5\), and

\[ 5^2=25. \]

Add and subtract \(25\):

\[ y=x^2+10x+25-25+21. \]

Then

\[ y=(x+5)^2-4. \]

The vertex is

\[ (-5,-4). \]

Worked Example: Leading Coefficient Greater Than 1

Rewrite

\[ y=3x^2-12x+7 \]

in completed-square form.

Factor \(3\) from the quadratic and linear terms:

\[ y=3(x^2-4x)+7. \]

Half of \(-4\) is \(-2\), and

\[ (-2)^2=4. \]

Add and subtract \(4\) inside the parentheses:

\[ y=3(x^2-4x+4-4)+7. \]

Then

\[ y=3[(x-2)^2-4]+7. \]

Distribute:

\[ y=3(x-2)^2-12+7. \]

Therefore,

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

The vertex is

\[ (2,-5). \]

Worked Example: Solve by Completing the Square

Solve

\[ x^2-8x+7=0. \]

Move the constant:

\[ x^2-8x=-7. \]

Half of \(-8\) is \(-4\), and

\[ (-4)^2=16. \]

Add \(16\) to both sides:

\[ x^2-8x+16=9. \]

Then

\[ (x-4)^2=9. \]

Take square roots:

\[ x-4=\pm3. \]

Therefore,

\[ x=7 \]

or

\[ x=1. \]

Worked Example: Irrational Solutions

Solve

\[ x^2+2x-5=0. \]

Move the constant:

\[ x^2+2x=5. \]

Half of \(2\) is \(1\), and

\[ 1^2=1. \]

Add \(1\) to both sides:

\[ x^2+2x+1=6. \]

Then

\[ (x+1)^2=6. \]

So

\[ x+1=\pm\sqrt{6}, \]

giving

\[ x=-1\pm\sqrt{6}. \]

Common Errors

Forgetting to Square the Half

For

\[ x^2+10x, \]

half of \(10\) is \(5\), but the number added is

\[ 5^2=25, \]

not \(5\).

Adding to Only One Side of an Equation

When solving an equation, if \(9\) is added to the left side, it must also be added to the right side.

Ignoring the Leading Coefficient

For

\[ 2x^2+8x, \]

first factor \(2\):

\[ 2(x^2+4x). \]

Then complete the square inside the parentheses.

Forgetting the \(\pm\) While Solving

From

\[ (x-h)^2=k, \]

with \(k>0\), solving for \(x\) requires

\[ x-h=\pm\sqrt{k}. \]

Confusing Rewriting with Solving

Rewriting

\[ x^2+6x+5 \]

as

\[ (x+3)^2-4 \]

does not solve anything by itself. It simply expresses the same quadratic in a more revealing form.

Practice

1. Complete the Square

What number completes the square?

\[ x^2+14x+\square \]
Check Answer

Half of \(14\) is \(7\), and

\[ 7^2=49. \]

So

\[ x^2+14x+49=(x+7)^2. \]

2. Negative Middle Term

Complete the square:

\[ x^2-18x+\square \]
Check Answer

Half of \(-18\) is \(-9\), and

\[ (-9)^2=81. \]

Therefore,

\[ x^2-18x+81=(x-9)^2. \]

3. Rewrite a Quadratic

Rewrite in completed-square form:

\[ x^2+4x+9. \]
Check Answer \[ x^2+4x+9 = x^2+4x+4+5 = (x+2)^2+5. \]

4. Solve by Completing the Square

Solve:

\[ x^2+6x-7=0. \]
Check Answer \[ x^2+6x=7. \]

Add \(9\):

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

Then

\[ x+3=\pm4. \]

So

\[ x=1 \]

or

\[ x=-7. \]

5. Find the Vertex

Rewrite and identify the vertex:

\[ y=x^2-8x+13. \]
Check Answer \[ y=x^2-8x+16-3 \]

so

\[ y=(x-4)^2-3. \]

The vertex is

\[ (4,-3). \]

6. Leading Coefficient

Rewrite in completed-square form:

\[ 2x^2+12x+5. \]
Check Answer \[ 2x^2+12x+5 = 2(x^2+6x)+5 \] \[ = 2(x^2+6x+9-9)+5 \] \[ = 2(x+3)^2-18+5 \] \[ = 2(x+3)^2-13. \]

Key Ideas

Where This Leads

Completing the square shows how a carefully chosen equivalent form can expose both algebraic and geometric information.

Next, we will study Algebraic and Conditional Identities, distinguishing equations that are true throughout a domain from identities whose validity depends on explicit restrictions or conditions.