This article is a repost of a Medium post that you can view here, and will just be a quick proof of the quadratic formula [1][2], the formula that is used to work out the solutions to the general quadratic equation [3]. The primary method by which this general solution will be derived will be through the method of completing the square.

the quadratic forumla (rendered with this script)

# Completing the Square

The method of completing the square is important to deriving the quadratic formula. We are concerned with deriving the values of x given a quadratic equation in the form:

To “complete the square” for a second-order polynomial, the procedure is as follows[4][5]:

1. Divide the $a$, $b$, and $c$ coefficients by the $a$ coefficient.
2. Transpose the $c$ coefficient to the other side of the equation.
3. Take the $b$ coefficient, and multiply it by one-half (1/2), and let’s store the result in the variable $\epsilon$. Then, take $\epsilon$, square it, and add the squared result to both sides of the equation.
4. Factor the trinomial expression. The result should be $(x + \epsilon)$
5. Extract the roots from both sides of the equation

Example with arbitrary second-order polynomial:

Given:

We first divide the entire trinomial by the “2” coefficient:

Then, we transpose the “5” onto the other side of the equation:

Next, we multiply $-\frac{9}{2}$ by $\frac{1}{2}$ and store the result ($-\frac{9}{4}$) in $\epsilon$. We take $\epsilon$ and square it to get $\frac{81}{16}$. We then add the result onto both sides of the equation:

Carrying on, we factor the expression, where the solution to the factor will be $(x + \epsilon)^2$. We know that $\epsilon$ is equal to $-\frac{9}{4}$, so we therefore have:

Finally, we just need to extract the roots of the equation. Take the square root of both equations, which will give us:

Solving for $x$, we have:

# The Derivation

To derive the quadratic formula, we just need to apply the method of completing the square to the general form of the quadratic foumula. We are going to manipulate the equation algebraically.

Given:

We must first divide the trinomial by the $a$ coefficient, which gives us:

Then, we are going to transpose $\frac{c}{a}$ to the right side of the equation, giving us:

Next, we are going to multiply the $\frac{b}{a}$ coefficient by $\frac{1}{2}$, store the result in $\epsilon$, and square it:

Add $\epsilon^2$ to both sides of the equation:

Then, we factor out the trinomial, the result is $(x + \epsilon)^2$

Do the arithmetic on the right-hand side of the equation:

Extract the roots from both sides of the equation:

We finally just move the $\frac{b}{2a}$ coefficient from the left side of the equation onto the right side to get:

Q.E.D.

# Conclusion

“Completing the Square” is a great method to solve for quadratic equations when factoring methods will not suffice. Completing the square can also be used to solve Gaussian integrals [6], but that’s for another article for the future ;-)

# Footnotes

1. Boljanovic, V. (2016) pp. 89–92