For a general quadratic equation of the form ax2 + bx + c = 0 (1)
We will solve for x via the ‘Completing the Square‘ method:
First we divide equation (1) through by a on both sides, yielding:
x2 +(b/a)x + c/a = 0
Slightly rearranging, we then write (for tidiness):
x2 + (b/a)x = -c/a (2)
Now the key behind completing the square is to try and write the x2 and x terms as the square of some quantity, which is close to:
(x + (b/2a))2 (3)
What we have done is half the coefficient of the x term, as when the brackets are expanded out, you have a certain sum repeated twice, I will demonstrate in fuller detail now what I mean.
Expanding out (3), we have
(x +(b/2a))(x+(b/2a)) = x2+ (b/2a)x + (b/2a)x + (b2/4a2) = x2 + (b/a)x + (b2/4a2) , which is almost identical to the left hand side of equation (2), except now we have the extra third term which is (b2/4a2)
We can rearrange this easily to show that x2+ (b/a)x =(x +(b/2a))2-(b2/4a2)
Substituting this identity into equation (2), we now have
(x +(b/2a))2 -(b2/4a2) = -c/a (4)
We now rearrange as follows:
(x+(b/2a))2 = (b2/4a2) - (c/a) = (b2-4ac)/(4a2) ,
where in the third equality I have simply summed over a common denominator by multiplying the second term by 4a over the numerator and denominator.
Finally we take the square root of both sides, and rearrange to arrive at the quadratic formula we were looking for, as follows:
x = (-b ± sqrt(b2-4ac))/2a
Note that we have two solutions to the quadratic equation, resulting from the existence of both positive and negative square roots, hence the ± sign. Also ‘sqrt' denotes taking the square root.
Corollary
Note that the solution of x depends on the quantity sqrt(b2-4ac), which is known as the Discriminant. This is important as it results with 3 distinct cases for the solution which are as follows:
1) b2 - 4ac > 0 , and so it gives one positive and one negative square root, leading to 2 unique solutions.
2) b2 -4ac = 0, which then yields exactly one solution, known as a repeated root, -b/2a .
3) b2 -4ac < 0, which cannot be square rooted within our common number system which we call the Real Numbers. If we extend our number system, to allow for square roots of negative numbers, we call these the Complex Numbers, which go far beyond the scope of the course.
If you want to find out more, be sure to stay on till A Level and take Further Maths!