The quadratic equation
23 January, 2019Readtime: 3 mins
The first mathematics related post, let’s keep it simple. Here we are going back to GCSE days.
During my academic life I’ve dabbled in various teaching roles, mainly during my PhD I would help out undergraduate physics and maths students with their set assignments. Obviously not giving them the answers straight away, but helping them understand the problem. Most of the problems involved were a bit trickier than simple algebra, however no matter how able the student was, the same question always came up when it reduced to a simple quadratic equation - “What’s the quadratic formula again?”. Well before I could explain how to derive it, they simple googled the formula, and lo and behold they were awoken from their brief lapse of school classroom panic. This post aims to put that to bed, so that no student will ever need to remember it, and they can then derive it themselves (no internet connection required).
Let’s first start with the quadratic equation
where are the coefficients and is the unknown we wish to solve.
To solve this, we need it in the form of:
otherwise known as completing the square, such that then we can solve for as
Expanding the second form we have
and equating coefficients with the first form we have
or in terms of the unknowns,
Simply putting it all back in the solution for we have our beloved formula
Now, let’s expand on this. We have a quadratic function, with 3 coefficients, and , however we have the constraint that it is equal to 0 (since we want the roots of this function). Thus, we can remove 1 coefficient. Let’s remove for convenience (setting it equal to 1), which can be done by the transformations:
Setting a = 1, we have
and then our beloved formula is slightly simpler (remember that this applies when a = 1 only)
The first thing to notice is that we can have a problem with the square root if . This of course would lead to 2 complex roots, since , where indicates an imaginary unit. We then have 3 possible regimes of roots: 2 real roots, 2 complex roots or 2 degenerate roots (the same root twice), see the below image.
Written by Thomas Stainer who likes to develop software for applications mainly in maths and physics, but also to solve everyday problems. Check out my GitHub page here.