Complete the square on the general quadratic equation.
We have ax squared plus bx plus c is equal to 0.
So whenever I complete the square, actually whenever I
deal with any of these types of quadratic equations, I
always like to not have an a, or a non 1 coefficient, on the
x squared terms. So let's make it into a 1 coefficient.
And the easiest way to do that is just divide
everything by a.
So we divide every term on the left side by a, and of course
we have to divide the right side by a as well.
And so the left side will become x
squared plus b over ax.
And then I'll write c over a over here.
So we have some room to add and subtract things so we can
really complete the square.
So plus c over a is equal to 0 divided by a, which is just
going to be equal to 0.
Now when we complete the square, we've seen this
multiple times before, what we want to do is take the
coefficient on the x term right here, it's b over a,
take half of it.
This right here is two times b over 2a.
Right?
The 2's cancel out.
This is just 2 times b over 2a.
So you take half of it, half of b over a is b over 2a.
You take half of it, and then you square it, and you add it
right here.
So plus b squared-- Let me write it this way.
b over 2a squared.
And of course I can't just add something to one side of the
equation, that would change the equation.
I also either have to add it to the other side, or just
subtract it from the same side that I'm adding it to.
So I'll also subtract the b over 2a
squared just like that.
Now, the whole point of doing this is so these first three
terms right here are a perfect square trinomial.
That's what completing the square is all about.
And we've seen the pattern multiple times.
If I have, let's say, m plus n squared-- and I'm using m and
n so we don't get confused with the a's and b's
and x's over here.
But if I have m plus n squared, we've seen multiple
times, that's going to be equal to m squared plus 2mn
plus n squared.
And here we have that pattern now.
That's the whole point behind completing the square.
That's the whole point behind taking half of b over a--
that's b over 2a-- and then squaring it and adding it
right here.
We now fit that pattern.
m is x.
n is b over 2a.
And 2mn, if I take an x times a b over 2a, and multiply that
by 2, I get b over ax.
So this expression, right here, this trinomial, the
first three terms, it is a perfect square trinomial, and
we can write it as x plus b over 2a squared.
And then of course we have all this other
business right here.
And then of course we have all of this
other stuff right here.
Which is negative b over, and let me just actually
square it for you.
So b over 2a squared is negative b
squared over 4a squared.
And then I have this plus c over a.
But let's write it with the same denominator here.
So I could have c over a, or I could multiply the numerator
and the denominator by 4a.
So if I multiply the numerator by 4a, I get 4ac.
If I multiply the denominator by 4a, I get 4a squared.
And the whole reason why I multiplied the numerator and
the denominator by 4a was so that we have the same
denominator right here.
And, of course, that is going to be equal to 0.
And we could simplify it a little bit more, or actually,
well yeah we'll just simplify it next in the next step.
We don't want to skip too many steps here.
So you have x plus b over 2a squared.
And then we could say, plus-- we could put the 4ac first, so
we could say-- actually let's just say, plus negative b
squared, plus 4ac, all of that over 4a squared is equal to 0.
I didn't put the 4ac first, I just put the negative b
squared there.
Now let's isolate this squared binomial on
the left hand side.
And the easiest way we can do that is to subtract this thing
from both sides of the equation.
So let's do that.
So you can imagine if we add b-- let me do this in a
different color.
If we were to add positive b squared minus 4ac over 4a
squared on the left hand side, those will cancel out and
we're also going to add it on the right hand side.
Positive b squared minus 4ac over 4a squared.
Anything I do the left I have to do the right.
What do we end up with?
We end up with, on the left hand side, these two guys
cancel out.
We have the same denomenator, when you add the numerators,
that cancels with that.
The 4ac cancels with the negative 4ac, these just
completely cancel out.
And on the left hand side, you just have x
plus b over 2a squared.
And on the right hand side, you have that being equal to b
squared minus-- let me do that in a blue color.
b squared minus 4ac, all of that over 4a squared.
Now the next thing we probably want to do, if we want to
really solve for x, is to take the square root of both sides
of this equation.
So let's do that.
Let's take the square root of both sides of this equation.
And if, when we do that-- We don't want to only take the
positive square root because x plus b be over 2a could be a
negative number, or it could be a positive number.
So we want to take the positive and
negative square root.
So we could say that the square root, we could put the
positive or negative here or, since we're taking the square
root of both sides, we could put the
positive or negative there.
If you put the positive or negative on both sides, it's
really just telling you the same thing.
It really is all the different combinations.
If the negative square root over here equals the negative
square root over here, then it's just another combination
of the different positives and negatives.
So you could just write it as, this square root is equal to
the plus or minus square root of b squared
minus 4ac over 4a squared.
Now what does this simplify to?
Well, the left hand side just becomes x plus b over 2a is
equal to-- and now it gets interesting.
And you might even start recognizing parts of it.
So let's take the plus or minus square root of the top.
What is that going to be?
And you could just take the plus or minus only of the top
because, once again, the same principles apply.
There's no reason why you have to do a plus or minus over a
plus and minus and a plus or minus on the left hand side.
There's only one combination here, where there's only one
plus or minus on the numerator.
I apologize if that confuses you.
So let's write this as the plus or minus square root of b
squared minus 4ac over-- What's the square
root of 4a a squared?
Well, it's just going to be 2a.
Right?
The square root of 4 is 2.
The square root of a squared is a.
And we're almost there.
To solve for x, we just have to subtract b over 2a from
both sides.
We just have to subtract b over 2a from both sides of
this equation.
The left hand side, we just end up with our x.
And then the right hand side, we have a negative b over 2a
plus or minus the square root of b squared minus 4ac-- all
of that over 2a.
Since we have the same denominator, we can write this
as negative b plus or minus the square root of b squared
minus 4ac-- all of that over 2a.
And we're done.
We've solved for the x's and you see there's actually two
solutions here.
There's one where you take the positive square root, and
there's another solution where you take the
negative square root.
If this square root exists, and if the positive and
negative-- and if it's not 0, you're
going to have two solutions.
And this, right here, this result we have is-- Look, you
give me any quadratic equation, you give me the a,
the b, and the c, we could now substitute it into this
formula essentially we just derived right here, and I'll
give you the roots, I'll give you the x's for that quadratic
equation-- the x's that satisfy
that quadratic equation.
And this formula, right here, for solving any quadratic
equation is called the quadratic formula.
And you could see it just comes straight out of
completing the square.
There's no mystery, magic here.
But it's easily one of the most useful formulas in
mathematics.
And I'm usually not a huge proponent
of memorizing things.
But it probably will benefit you in life if you did.
Hope you enjoyed that.