The Central Idea

Recall the perfect-square identity

\[ (x+p)^2=x^2+2px+p^2. \]

If we begin with

\[ x^2+bx, \]

we can choose a number that turns the expression into a perfect-square trinomial.

Because

\[ 2p=b, \]

we need

\[ p=\frac{b}{2}. \]

Therefore,

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

This is the basic mechanism behind completing the square.

Why It Is Called Completing the Square

The expression

\[ x^2+bx \]

is missing the constant term needed to become the square of a binomial.

Adding

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

completes that pattern.

For example,

\[ x^2+6x \]

becomes

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

because

\[ \left(\frac{6}{2}\right)^2=9. \]

Then

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

The Half-and-Square Rule

When the coefficient of \(x^2\) is \(1\), completing the square follows a compact rule:

  1. take the coefficient of \(x\);
  2. divide it by \(2\);
  3. square the result.

For

\[ x^2+10x, \]

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

\[ 5^2=25. \]

Therefore,

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

Example with a Negative Middle Term

Complete the square for

\[ x^2-8x. \]

Half of \(-8\) is

\[ -4. \]

Square it:

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

Therefore,

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

So

\[ \boxed{x^2-8x+16=(x-4)^2}. \]

Completing the Square Inside an Equation

When solving an equation, whatever we add to one side must also be added to the other.

Solve

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

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

\[ 3^2=9. \]

Add \(9\) to both sides:

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

Then

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

Finish the Equation

Take square roots:

\[ x+3=\pm4. \]

Therefore,

\[ x=-3\pm4. \]

So

\[ \boxed{x=1,\ -7}. \]

Why the \(\pm\) Matters

If

\[ u^2=k, \]

then both

\[ u=\sqrt{k} \]

and

\[ u=-\sqrt{k} \]

square to \(k\), provided \(k\ge0\) in the real-number setting.

Therefore,

\[ \boxed{u=\pm\sqrt{k}}. \]

Example: Solving a Nonfactorable Quadratic over the Integers

Solve

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

Move the constant:

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

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

\[ 2^2=4. \]

Add \(4\) to both sides:

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

Therefore,

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

Finish the Irrational-Solution Example

Take square roots:

\[ x+2=\pm\sqrt5. \]

Therefore,

\[ \boxed{x=-2\pm\sqrt5}. \]

Completing the square works even when the answers are not integers or rational numbers.

When the Leading Coefficient Is Not 1

Consider

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

Before completing the square, make the coefficient of \(x^2\) equal to \(1\).

Divide every term by \(2\):

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

Then

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

Complete the Square After Normalizing

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

\[ 2^2=4. \]

Add \(4\):

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

Therefore,

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

Thus

\[ \boxed{x=-2\pm\sqrt7}. \]

Completing the Square for a Quadratic Function

Completing the square is also useful when no equation is being solved.

It can convert standard form

\[ ax^2+bx+c \]

into vertex form

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

This makes the vertex and axis of symmetry visible immediately.

Example: Convert to Vertex Form

Rewrite

\[ f(x)=x^2-6x+5 \]

in vertex form.

Focus on

\[ x^2-6x. \]

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

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

Add and subtract \(9\) within the expression:

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

Finish the Vertex-Form Conversion

Group the perfect square:

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

Simplify:

\[ \boxed{f(x)=(x-3)^2-4}. \]

The vertex is therefore

\[ \boxed{(3,-4)}. \]

The axis of symmetry is

\[ \boxed{x=3}. \]

Add-and-Subtract Versus Add-to-Both-Sides

There are two closely related settings.

In an equation, preserve equality by adding the same quantity to both sides.

In a single expression, preserve value by adding and subtracting the same quantity:

\[ +k-k=0. \]

Both methods preserve the original mathematics while creating a perfect square.

Vertex Form When \(a\neq1\)

Rewrite

\[ f(x)=2x^2+8x+1 \]

in vertex form.

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

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

Complete the square inside the parentheses:

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

Compensate Correctly

Because the added \(4\) is inside parentheses multiplied by \(2\), it changes the full expression by

\[ 2(4)=8. \]

Therefore,

\[ f(x)=2(x^2+4x+4)+1-8. \]

So

\[ \boxed{f(x)=2(x+2)^2-7}. \]

The vertex is

\[ \boxed{(-2,-7)}. \]

A General Vertex-Form Result

Starting from

\[ f(x)=ax^2+bx+c, \]

factor \(a\) from the first two terms:

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

Half the coefficient of \(x\):

\[ \frac{1}{2}\left(\frac{b}{a}\right)=\frac{b}{2a}. \]

Square it:

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

Complete the General Square

Add and subtract the needed quantity:

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

The first three terms form a square:

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

Therefore,

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

The Vertex from the General Form

Combine the constant terms:

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

Thus,

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

The vertex \(x\)-coordinate is therefore

\[ \boxed{-\frac{b}{2a}}, \]

which explains the axis-of-symmetry formula introduced previously.

From Completing the Square to the Quadratic Formula

Now begin with the general quadratic equation

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

where

\[ a\neq0. \]

Our goal is to solve for \(x\) without assuming that the quadratic factors conveniently.

Step 1: Divide by \(a\)

Divide every term 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}. \]

Step 2: Complete the Square

Half the coefficient of \(x\):

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

Square it:

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

Add that quantity to both sides:

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

Step 3: Rewrite Both Sides

The left side is a perfect square:

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

Give the right side a common denominator:

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

Therefore,

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

Step 4: Take Square Roots

Taking both square roots gives

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

This simplifies to

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

Equivalently, after absorbing the sign choice into the \(\pm\) notation, the solution is conventionally written with denominator \(2a\).

Step 5: Isolate \(x\)

Subtract

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

and combine over the common denominator \(2a\):

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

This is the quadratic formula.

The Quadratic Formula

For

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

the solutions are

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

Unlike factoring by inspection, this method does not depend on finding a convenient factor pair.

Identify \(a\), \(b\), and \(c\) Carefully

Before using the quadratic formula, write the equation in standard form:

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

Then identify the coefficients with their signs.

For

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

we have

\[ \boxed{a=2,\qquad b=-5,\qquad c=-3}. \]

Example: Quadratic Formula with Integer Solutions

Solve

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

Substitute

\[ a=2,\qquad b=-5,\qquad c=-3. \]

Then

\[ x= \frac{-(-5)\pm \sqrt{(-5)^2-4(2)(-3)}}{2(2)}. \]

Simplify:

\[ x= \frac{5\pm\sqrt{25+24}}{4}. \] \[ x= \frac{5\pm7}{4}. \]

Finish the Integer-Solution Example

The two solutions are

\[ x=\frac{5+7}{4}=3 \]

and

\[ x=\frac{5-7}{4}=-\frac12. \]

Therefore,

\[ \boxed{x=3,\ -\frac12}. \]

Example: Irrational Solutions

Solve

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

Here,

\[ a=1,\qquad b=4,\qquad c=-1. \]

Apply the formula:

\[ x= \frac{-4\pm\sqrt{16+4}}{2}. \] \[ x= \frac{-4\pm\sqrt{20}}{2}. \]

Since

\[ \sqrt{20}=2\sqrt5, \]

we obtain

\[ \boxed{x=-2\pm\sqrt5}. \]

The Formula Agrees with Completing the Square

Earlier, completing the square on

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

produced

\[ x=-2\pm\sqrt5. \]

The quadratic formula gives exactly the same result.

That agreement is expected because the quadratic formula was derived by completing the square.

Choosing a Method

Several methods can solve quadratic equations.

Good algebra includes choosing a method suited to the structure of the problem.

Example: Which Method Is Easiest?

Consider

\[ x^2-9=0. \]

Although the quadratic formula would work, the equation is already a difference of squares:

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

So factoring or square roots gives

\[ \boxed{x=\pm3} \]

with less work.

Example: When the Quadratic Formula Is Convenient

Consider

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

This does not factor conveniently over the integers.

The quadratic formula gives

\[ x= \frac{-2\pm\sqrt{4+84}}{6}. \] \[ x= \frac{-2\pm\sqrt{88}}{6}. \]

Since

\[ \sqrt{88}=2\sqrt{22}, \]

we obtain

\[ \boxed{x=\frac{-1\pm\sqrt{22}}{3}}. \]

The Quantity Under the Radical

The expression

\[ \boxed{b^2-4ac} \]

appears naturally during the derivation of the quadratic formula.

It determines the type of square root appearing in the solutions.

In the next lesson, this expression will be named the discriminant and used systematically to classify real and complex roots.

Quadratic Formula and the Axis of Symmetry

The two quadratic-formula solutions are

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

and

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

Their average is

\[ \frac{x_1+x_2}{2} = -\frac{b}{2a}. \]

This is exactly the axis of symmetry.

Why the Roots Are Symmetric Around the Axis

The quadratic formula has the form

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

The quantity

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

is the center between the two roots.

The plus-or-minus term moves an equal algebraic distance in opposite directions from that center.

The formula therefore encodes the symmetry of the parabola directly.

Common Error: Completing the Square with the Wrong Number

To complete

\[ x^2+12x, \]

do not square \(12\).

First take half:

\[ \frac{12}{2}=6. \]

Then square:

\[ 6^2=36. \]

Therefore,

\[ \boxed{x^2+12x+36=(x+6)^2}. \]

Common Error: Adding to Only One Side

In an equation,

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

adding \(9\) only to the left side would change the solution set.

The correct step is

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

Equality must be preserved.

Common Error: Forgetting to Normalize the Leading Coefficient

In

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

the half-and-square rule should not be applied directly to the coefficient \(8\) while the leading coefficient is \(2\).

First divide by \(2\):

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

Then complete the square.

Common Error: Losing a Sign in the Quadratic Formula

Suppose

\[ b=-5. \]

Then the numerator begins with

\[ -b=-(-5)=5. \]

Writing \(-5\) instead of \(5\) changes both solutions.

Substituting coefficients with parentheses helps prevent this error.

Common Error: Dividing Only Part of the Numerator

The formula is

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

The denominator \(2a\) divides the entire numerator.

It is not

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

Grouping the full numerator visually prevents this mistake.

Common Error: Forgetting \(\pm\)

The quadratic formula usually represents two solutions because

\[ \pm \]

means both a plus case and a minus case.

Omitting one sign may discard one valid root.

A Reliable Procedure for Completing the Square in an Equation

  1. Write the quadratic in a convenient form.
  2. If necessary, divide so the coefficient of \(x^2\) is \(1\).
  3. Move the constant term to the other side.
  4. Take half the coefficient of \(x\).
  5. Square that number.
  6. Add it to both sides.
  7. Rewrite the left side as a squared binomial.
  8. Take both square roots.
  9. Solve for \(x\).

A Reliable Procedure for Converting to Vertex Form

  1. Start with \(ax^2+bx+c\).
  2. Factor \(a\) from the quadratic and linear terms if \(a\neq1\).
  3. Complete the square inside the grouped expression.
  4. Compensate for the added quantity without changing the function.
  5. Rewrite the perfect square.
  6. Simplify the constant term.
  7. Read the vertex from \(a(x-h)^2+k\).

A Reliable Procedure for the Quadratic Formula

  1. Put the equation in the form \(ax^2+bx+c=0\).
  2. Identify \(a\), \(b\), and \(c\) with their signs.
  3. Substitute using parentheses.
  4. Compute \(b^2-4ac\) carefully.
  5. Simplify the square root when possible.
  6. Evaluate both the plus and minus cases.
  7. Simplify the solutions.
  8. Check by substitution when appropriate.

Practice 1: Complete the Square

Find the number that completes the square:

\[ x^2+14x+\underline{\hspace{1.5cm}}. \]

Practice 2: Solve by Completing the Square

Solve:

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

Practice 3: Solve with a Leading Coefficient

Solve by completing the square:

\[ 3x^2+12x-6=0. \]

Practice 4: Convert to Vertex Form

Rewrite:

\[ f(x)=x^2+10x+7. \]

Practice 5: Vertex Form with \(a\neq1\)

Rewrite:

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

Practice 6: Quadratic Formula

Solve:

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

Practice 7: Quadratic Formula with Irrational Roots

Solve:

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

Practice 8: Identify the Coefficients

For

\[ 5x^2-7x+2=0, \]

identify \(a\), \(b\), and \(c\).

Practice 9: Choose a Method

State a convenient method for each equation:

  1. \(x^2=36\)
  2. \(x^2-7x+12=0\)
  3. \(2x^2+3x-7=0\)

Practice 10: Connect Roots and Axis

A quadratic has roots

\[ -3 \]

and

\[ 7. \]

Find the axis of symmetry.

Practice Answers

Practice 1

Half of \(14\) is \(7\):

\[ 7^2=\boxed{49}. \]

Practice 2

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

Add \(16\):

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

Therefore,

\[ x+4=\pm5 \]

and

\[ \boxed{x=1,\ -9}. \]

Practice 3

Divide by \(3\):

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

Move the constant:

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

Add \(4\):

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

Therefore,

\[ \boxed{x=-2\pm\sqrt6}. \]

Practice 4

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

Therefore,

\[ \boxed{f(x)=(x+5)^2-18}. \]

Practice 5

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

Complete the square:

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

Therefore,

\[ \boxed{f(x)=2(x-2)^2-5}. \]

Practice 6

Here,

\[ a=1,\qquad b=-3,\qquad c=-4. \]

Then

\[ x= \frac{3\pm\sqrt{9+16}}{2} = \frac{3\pm5}{2}. \]

Therefore,

\[ \boxed{x=4,\ -1}. \]

Practice 7

Here,

\[ a=2,\qquad b=4,\qquad c=-3. \]

Then

\[ x= \frac{-4\pm\sqrt{16+24}}{4} = \frac{-4\pm\sqrt{40}}{4}. \]

Since

\[ \sqrt{40}=2\sqrt{10}, \]

we get

\[ \boxed{x=\frac{-2\pm\sqrt{10}}{2}}. \]

Practice 8

\[ \boxed{a=5,\qquad b=-7,\qquad c=2}. \]

Practice 9

  1. \(x^2=36\): square roots.
  2. \(x^2-7x+12=0\): factoring.
  3. \(2x^2+3x-7=0\): quadratic formula is convenient.

Practice 10

The axis lies halfway between the roots:

\[ x=\frac{-3+7}{2}. \] \[ \boxed{x=2}. \]

What to Remember

Completing the square is based on

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

It can be used to:

For

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

the quadratic formula is

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

The expression \(b^2-4ac\) under the radical will become the central object of the next lesson.

Where We Go Next

The quadratic formula contains more information than just a method for calculating roots. The quantity under its square root determines whether the equation has two distinct real roots, one repeated real root, or roots that require complex numbers.

The next lesson, Discriminants and Complex Roots, develops that classification and extends quadratic solutions beyond the real number system.