Completing the Square
The method of “completing the square” is sometimes useful in simplifying expressions. To see how it works, let’s write out what happens when we square the expression $$x + a$$, $$! \displaystyle \left( x + a \right)^2 = x^2 + 2ax + a^2$$ Notice the pattern on the right side: it’s the square of each term plus twice the mixed product. It always works this way. You can use the pattern to force an expression to contain a perfect square. For instance $$! \displaystyle \alpha x^2 + \beta x + \gamma$$ can be re-written to make use of the pattern if you factor out $$\alpha$$, $$! \displaystyle \alpha\left[x^2 + \frac{\beta}{\alpha}x + \frac{\gamma}{\alpha}\right]$$ then compare this with the first equation. It’s easy to see that the terms multiplying $$x$$ correspond to one another, $$! \displaystyle 2a = \frac{\beta}{\alpha}$$ so $$! \displaystyle a = \frac{\beta}{2\alpha}.$$ Therefore, making substitutions into the prototype $$! \displaystyle \left( x + a \right)^2 = x^2 + 2ax + a^2$$ yields $$! \displaystyle \left( x + \frac{\beta}{2\alpha} \right)^2 = x^2 + \frac{\beta}{\alpha}x + \left( \frac{\beta}{2\alpha} \right)^2$$ The point is that adding and subtracting the term $$\left(\beta/2\alpha\right)^2$$ enables you to write $$! \displaystyle \alpha x^2 + \beta x + \gamma$$ as an expression containing a perfect square: $$! \displaystyle \alpha\left[\left( x + \frac{\beta}{2\alpha} \right)^2 + \frac{\gamma}{\alpha} – \left( \frac{\beta}{2\alpha} \right)^2\right]$$ where $$x$$ only appears once and thus it is easy to isolate. This is what is meant by “completing the square”. The general procedure described above can be used in many different ways. It just requires some imagination.
Summary procedure in words:
- Divide the equation by the quadratic coefficient.
- Add and subtract the square of half of the linear coefficient.
- The expression now contains a perfect square which can be written as such.
Given $$! \displaystyle y = \alpha x^2 + \beta x + \gamma$$
1.
$$! \displaystyle \frac{y}{\alpha}=x^2 + \frac{\beta}{\alpha}x + \frac{\gamma}{\alpha}$$2.
$$! \displaystyle \frac{y}{\alpha} = x^2 + \frac{\beta}{\alpha}x + \left[\left( \frac{\beta}{2\alpha} \right)^2 -\left( \frac{\beta}{2\alpha} \right)^2\right] +\frac{\gamma}{\alpha}$$3.
$$! \displaystyle \frac{y}{\alpha} = \left[x^2 + \frac{\beta}{\alpha}x + \left( \frac{\beta}{2\alpha} \right)^2\right] -\left( \frac{\beta}{2\alpha} \right)^2 +\frac{\gamma}{\alpha}$$ $$! \displaystyle \frac{y}{\alpha} = \left( x + \frac{\beta}{2\alpha} \right)^2 -\left( \frac{\beta}{2\alpha} \right)^2 +\frac{\gamma}{\alpha}$$ $$! \displaystyle y = \alpha\left[\left( x + \frac{\beta}{2\alpha} \right)^2 -\left( \frac{\beta}{2\alpha} \right)^2\right] +\gamma$$ Example: The quadratic formula