# Completing the Square

This is a Helper Page for:
Parabola
Complex Numbers

## The Basics

Completing the Square is a method used to solve In fact, any quadratic equation can be solved using this method. When a quadratic is difficult to factor or it involves complex numbers, this method rewrites the quadratic equation originally in into which like a factored quadratic is much easier to solve.

The equation $ax^2+bx+c=0$
is converted into $a(x-h)^2+k=0$

and $x=\pm\sqrt{\frac{-k}{a}}+h$

## Perfect Square Trinomial

The method of completing the square uses a perfect square trinomial, which allows the quadratic to be easily factored. A perfect square trinomial is a quadratic equation that factors perfectly into two identical
In general, $x^2-2ax+a^2=(x-a)(x-a)=(x-a)^2$
where the equation on the left is the expression for all perfect square trinomials.

### Example of a Perfect Square Trinomial

Take the example of $x^2+6x+9$. It can be factored into $(x+3)(x+3)$ whcih is equal to $(x+3)^2$. The non-factored expression is the perfect square trinomial.

### Obtaining a Perfect Square Trinomial

A perfect square trinomial can be obtained even when the equation does not immediately factor into one.
Take the example of $x^2+10x+14$ which does not easily factor, nor is it a perfect square trinomial.However, it can be rewritten as the sum of a perfect square trinomial and a constant.
If we wanted the terms $x^2+10x$ to factor into a perfect square such as $x^2+2ax+a^2$, then we can let $10=2a$, thus $a=5$ making the last term $a^2=25$.
As long as the value of the expression does not change terms can be rewritten as combinations of other numbers. This idea is used to obtain a perfect square. We can rewrite 14 as the sum of two numbers, one of which should be 25.
So, $x^2+10x+14=x^2+10x+25-11$
The perfect square trinomial can be factored: $(x+5)^2-11$

#### Relationship between terms

• Note that the coefficient of the middle term is twice the square root of the constant term in a quadratic equation.
• In other words, the constant term is the square of half of the coefficient of x.
• Note that this holds only true if the coefficient of $x^2$ is 1.

{{HideThis|1=algebra|2=In general given the perfect trinomial and the equivalent squared binomial $x^2+bx+c=(x+d)^2$
Then $x^2+bx+c=x^2+2dx+d^2$
So, $b=2d$ and $c=d^2$
We can rearrange equalities to obtain the following: $c=\left ( \frac{b}{2}\right ) ^2 ==Procedure for Completing the Square== Let the quadratic equation be [itex]ax^2+bx+c=0$

• : Move the constant term c over to the other side of the equal sign.
• : Factor out a, the coefficient of the squared term.
• : Complete the quadratic in the parenthesis to make a perfect square trinomial by adding the square of half of the coefficient. Add the equivalent value to the right side of the equation to maintain the equality. Remember to multiply the obtained constant by a when added to the right side.
• : Factor the left side, simplify the right side and bring it over to the left.
• : If asked for, solve for x.

<template>AlignEquals

### Example with a = 1

All the different letters are bound to get confusing. It may be easier to understand the process using an example with real numbers. Suppose we are given the quadratic $x^2-12x+5=0$, and asked to solve for x. The first thing we do is see if it can be factored: it can't. So to solve for x, we will complete the square.

### Example with $a \neq 1$

Given $3x^2+2x-7=0$