Recall the algebraic identity

We can use this to complete the square. Consider the quadratic function

What can be added to yield a perfect square? Compare the coefficients of :

Then

Generalizing to any quadratic function of the form , 2e=b which yields e=b/2. Hence

Example: Use Complete the Square Method to solve

Note that the method above is for quadratic functions containing . We divide the equation by 2:

which is equivalent to

In order to generate a perfect square we add to both sides of the equation

Easy algebraic calculations give

Taking the square-roots lead to

or

which give the solutions to the equation:

or

See also the quadratic formula.