Return to my Mathematics pages
Go to my home page
Note: This is the alternative Quadratic Formula page, for WWW browser which cannot display special symbols. In particular, I am using ^2 for "squared" and +- for "plus or minus" in this version. Please let me know if this is working for you or not, by sending me email. Return to the primary Quadratic Formula page.
© Copyright 1998, Jim Loy
The quadratic formula gives us the two solutions to quadratic equations like this:
ax^2+bx+c=0
The formula, using sqrt() for the (positive) square root:
x=(-b+-sqrt(b^2-4ac))/2a
Back, when I was in junior high school, I derived the quadratic formula (having never seen it before). I'm still fairly proud of that accomplishment, and I would like to show you how I did it. But first, I will show you how it is normally done. It is done by completing the square, which I will define below.
First we modify our equation, by dividing both sides by a, and then putting the rightmost term on the other side of the equation (by subtracting it from both sides):
x^2+bx/a+c/a=0
x^2+bx/a=-c/a
Now we complete the square. We ask ourselves, "What do we need to add to the left side of the equation, to make it a perfect square?" In general we have something like x^2+fx. The answer to our question, for this expression, is f^2/4, since x²+fx+f^2/4 is a perfect square, (x+f/2)^2. In the equation that we want to solve, f is b/a. We can just substitute b/a into our general expressions:
x^2+bx/a+b^2/(4a^2) is a perfect square
Well, if we add this b^2/(4a^2) to the left side of our equation, we must also add it to the right side:
x^2+bx/a+b^2/(4a^2)=b^2/(4a^2)-c/a
Since, the left side is a perfect square, we can express it as that perfect square:
(x+b/2a)^2=b^2/(4a^2)-c/a
And we can now take the square root of both sides:
x+b/2a=+-sqrt(b^2/(4a^2)-c/a)
Remember that the sqrt() function produces the positive square root of a number. But, there are actually two square roots to any number, one positive and one negative. So, the above operation required the +- sign before the sqrt() function. We can now simplify the right side somewhat:
x+b/2a=+-sqrt(b^2/(4a^2)-4ac/4a^2)
x+b/2a=+-sqrt(b^2-4ac)/2a
And finally, we subtract b/2a from both sides, to get the x all by itself:
x=-b/2a+-sqrt(b^2-4ac)/2a
x=(-b+-sqrt(b^2-4ac))/2a
Which is our familiar quadratic formula.
Now, let's look at the way that I derived the quadratic formula, because it involves an interesting insight. I was trying to factor quadratic equations. And, I had seen that factoring is normally done by a kind of trial and error process. I wondered if there was a foolproof way of factoring. First, I divided our original equation by a, just as above:
x^2+bx/a+c/a=0
Then I spent several frustrating weeks, factoring the equation into (x-m)(x-n), where m and n are the hoped-for solutions to the equations:
(x-m)(x-n)=0
x^2-(m+n)x+mn=0
This gives us two equations:
m+n=-b/a
mn=c/a
We now have two equations and two unknowns. We should be able to solve for m and n. But, every equation we come up with is another quadratic equation. We can never simplify our equations.
Then I hit upon my insight, a pair of factors that worked. I reasoned that there is a number p which is halfway between our two solutions. Then our two solutions (m and n) can be expressed as p+q and p-q. The equations above become:
(x-p-q)(x-p+q)=0
x^2-2px+(p^2-q^2)=0
This gives us two equations:
p=-b/2a
p^2-q^2=c/a
And we substitute p=-b/2a into that last equation, and solve for q:
b^2/4a^2-q^2=c/a
q^2=b^2/4a^2-c/a
q=+-sqrt(b^2/4a^2-c/a)
q=+-sqrt(b^2/4a^2-4ac/4a^2)
q=+-sqrt(b^2-4ac)/2a
Well, q is not our solution. p+-q is our solution. So, we have two equations:
m=p-q=(-b-(+-sqrt(b^2-4ac)))/2a
n=p+q=(-b+-sqrt(b^2-4ac))/2a
Notice that one of these has a minus sign in front of the +- sign. But, both of these equations give us the same two solutions. So, we can get rid of one of them, leaving us with the quadratic formula:
x=(-b+-sqrt(b^2-4ac))/2a
Actually, since I was interested in factoring, rather than solving, I ended up with this:
ax^2+bx+c=a [x+(b+sqrt(b^2-4ac))/2a] [x+(b-sqrt(b^2-4ac))/2a]
I then went on to find all possible factors with whole numbered terms, from that.
Addendum #1:
Let me spell out just how we find factors using the quadratic formula. When factoring, we start with an expression like ax^2+bx+c and want to factor it into something like (qx+r)(sx+t). Using the quadratic formula, we started with ax^2+bx+c=0 and ended with x=m and x=n. How do we get from one to the other?
Well, we can deduce from the above paragraph that ax^2+bx+c=a(x-m)(x-n). This may be our solution, if a, m, and n are all integers. If m and n contain square roots (positive or negative), then there are no proper factors (factors with just integers). The final case is where m or n are fractions. We can often factor the integer a, and multiply some of its factors into the parentheses, ending with all integers. For example, let's say we got 12(x+2/3)(x-1/2), using the quadratic formula. Well, we factor 12, and do a little multiplication, and we get 2(3x+2)(2x-1). We could continue, and multiply the 2 into the parentheses, but then we do not get unique factors.
Addendum #2:
People who have used the quadratic formula may want a similar method for the three solutions of cubic (third power) equations. Such a method exists, but is so complicated and cumbersome that it is impractical to ever use it. Various computer approximation techniques are much easier to use. See a book on Numerical Analysis or Algorithms. A cubic equation may be factorable, of course; so that should probably tried first. See Cubic Equations.