What is a quadratic
equation?
A quadratic equation is an equation that can be written in this form.
ax2+bx+c=0
The a,b, and c here represent real number coefficients. So this
means we are talking about an equation that is a constant times the
variable squared plus a constant times the variable plus a constant
equals zero, where the coefficient a on the variable squared can't be
zero, because if it were then it would be a linear equation.
Examples
2x2+3x+1=0, x2+x=2x+3, (x+2)(x+3)=5
All these equations are equivalent to equations of the above form.
The first one is already in that form. The second one can be put into
it by subtracting 2x+3 from both sides. The third one can be put into
it by multiplying out and then subtracting 5 from both sides.
Standard Form
The form
ax2+bx+c=0
is the standard form for a quadratic equation, and for future
reference, here the letter a will always mean the coefficient on the
square of the variable, and b will be the coefficient on the variable,
and c will be the constant term. To get a quadratic into standard form
you must remove all parentheses and combine all like terms and add or
subtract something from both sides so that the right side will be zero.
Once you have your equation in standard form you can identify a,b, and
c.
Example
This and many of the other examples below are from my MathHelp
collection of problem sets, Quadratic Equations. For more practice and
worked out examples for this or any other techniques explained here,
click on the MathHelp link at the bottom of the page.
Problem: Write the equation in standard form and identify a,b, and
c.
Solution: Multiply the left side out and then subtract the 5 from both
sides.
Solving
Now lets talk about solving these equations.
Quadratic equations are harder to solve than linear equations,
because once you have them in standard form it is hard to simplify them
any further, and in this form there are still two occurrences of the
variable, so it's hard to see what we can do to get the variable alone.
So we have to find some clever tricks to get around this problem.
Solving by
Factoring
One trick is to solve the equation by factoring. This trick works
because of the principle of zero products. The principle of zero
products says
If A and B are real numbers and AB=0, then
either A=0 or B=0.
This is a very special property that only zero has. For other
numbers there are lots of ways to multiply and get them, but not for
zero. For zero, the only way to multiply numbers and get it, is if one
of the numbers is zero.
The principle of zero products allows us to reduce a complicated
equation to simpler equations provided the right side of the equation
is zero, and the equation is factored, because we can set each of the
factors equal to zero.
- To solve a quadratic by factoring, first you must make sure it
is in standard form. It is especially
important that it is set equal to zero, because remember,
the principle of zero products only works for zero.
- Then you must factor the left side.
- Then you set each of your factors equal to zero and solve the
equations you get to find the solutions to your equation.
Example
Problem: Solve the equation.
Solution:
The second line here comes from setting x+1 and x+6 equal to 0 by the
principle of zero factors.
What if you can't
factor?
But some quadratics are difficult to factor, so for these equations we
need other methods. The method of completing the square is a method
that will work for any quadratic, but it is a little bit complicated,
so I will introduce it slowly and step by step. But first to give you
an overview of where we are going, I will show you a simple example of
it.
Consider the following equation.
x2-2x-1=0
This looks like a nice simple friendly equation, but we can't solve
it by factoring, because we can't find two numbers to multiply and get
-1 and add and get -2, so we are going to have to find another method.
But if only that minus sign on the 1 weren't there, then we could
factor it really easily, in fact it would be a perfect square. How can
we make that minus sign go away?
Well, one thing we could do is add 2 to both sides of the equation,
and then the equation would become
x2-2x+1=2
and this factors to
(x-1)2=2
Now, I know what you're saying. You are saying, "But you said that
you have to get it set equal to 0 to solve it by factoring, because the
principle of zero products only works for 0. What good does it do to
have something factored and set equal to 2?"
And if you are saying this to yourself, you are absolutely right.
But this isn't just any old factorization. It is a perfect square, and maybe you can do
something with a perfect square set equal to 2.
If we could figure out how to solve equations like
(x-1)2=2
that is, perfect squares set equal to numbers, then we could solve
an equation like
x2-2x-1=0.
And if we could find a way to add a number to both sides of other
quadratics so that we can put them into the form perfect square equals
constant, then maybe we could be able to solve them too.
This means that to help us solve quadratic equations, we need to
learn two skills.
- Solve equations of the form (x+k)2=d, where k
and d are numbers.
- Find a way of figuring out what number to add to both
sides of a quadratic equations so that the left side will become a
perfect square.
|
To work our way up to the task of solving equations of the form
(x+k)2=d
let's first start with the slightly easier task of solving equation
of the form
x2=d
How do we solve an equation of the form
x2=d?
If x is greater than 0 then the obvious answer is
but this is not quite right because it only gives you the positive
square root of d, and all positive numbers have two square roots, a
positive one and a negative one. So to be sure that you are getting all
solutions to an equation of this form, your answer must be
If x less than 0 then what happens? What kind of number can you square
and get a negative number? If you square a positive number then clearly
you get a positive number. But if you square a negative number then you
have a product of two negative numbers, so you still get a positive
number. So what is left for squaring and getting a negative number?
Nothing. So the equation has no solutions.
Now let's look at the more general equation of the form
(x+k)2=d
This is really not much harder since anything you can do with x you
should be able to do with x+k. x+k represents a number too. So solve
for x+k and then add something to both sides of the equation to get x
alone.
Example 1
Problem: Solve the equation.
Solution:
Example 2
Problem: Solve the equation.
Solution: Anything you can do with x, you can do with x+1, and once you
find x+1 all you have to do to get x is subtract 1.
Completing the
Square
Now to problem number two, that of finding something to add to a
quadratic to make it a perfect square.
This is what is meant by completing the square, and the secret to it
is to expand out the expression
(x+k)2
and see what makes perfect squares tick. Applying our formula for
squaring a binomial, we get
(x+k)2=x2+2kx+k2
The key here is to look at the relationship between the coefficient
on x and the constant coefficient. The coefficient on x is 2k and the
constant term is k2. This means that if we know the
coefficient on x, and we want to know what the constant term has to be
for the expression to be a perfect square, then we need to divide the
coefficient on x by 2 to get k, and then square to get k2.
So if you have an expression of the form
x2+bx
and you want to find something to add to it to make it a perfect
square, then you need to
- Divide b by 2 to get k
- Square k to get k2.
|
Example
Problem: Complete the square.
Solution:
The yellow part is the scratch paper. On the scratch paper you first
divide the 9 by 2 and then square the result. Don't worry about the
minus sign, because it will go away when you square anyway. Then the
number you get will be the number you need to add to the expression to
make a perfect square out of it. After you do that it is good practice
to write it as the square that it is. For that you can use the first
line of your scratch paper and match the sign with the sign of the
second term of the original expression.
I hope the above has helped you understand the process of completing
the square. If not, there is another approach to it that I have written
an article about that you might find interesting for further
understanding. It is a geometrical approach based on the method that
many earlier mathematician used. You can read my article A Geometrical Approach to Completing the Square
to find out about it.
Solving by
Completing the Square
Now we are ready to use the method of completing the squares to solve
quadratic equations. The best way to do this is as follows.
- Add something to both sides so that the left side has no
constant term.
- Figure out what to add to the left side to make it a
perfect square, and add that to both sides.
- Write the left side as the perfect square that it is and
do the arithmetic on the right side.
- Solve the equation you get by the methods of equations of
the form (x+k)2=d
|
One thing we left out. So far all of the equations we have solved
have had a coefficient of 1 on x2. What do we do if we have
a coefficient other than 1 on there?
Well, we don't really have any method of completing the squares to
deal with that situation, so the easiest thing to do is just divide
both sides by it and put up with the fractions. With completing the
squares, fractions are not so bad to deal with because there is no
guess work.
Example
Problem: Solve the equation.
Solution:
First we divide both sides of the equation by 2, to get a coefficient
of 1 on the first term. 0/2 is still 0. Then we add 1/2 to both sides
so that it is easier to figure out what to add to make the left side a
perfect square. Then we complete the square in order to figure out what
to add to both sides to make the left side a perfect square. The
scratch work for this is shown in yellow. The best way to divide a
fraction by 2 is to multiply it by 1/2. Then we write the left side as
the perfect square that it is, and do the arithmetic on the right side.
Now take square roots and add 3/4 to both sides to get the final
answer.
The Quadratic
Formula
Now that you have learned the method of completing the squares, I will
tell you a secret. The methods of completing the squares is such a good
method for solving quadratics that it is very seldom used for it. It is
used for other things in mathematics. See my article
Equations of Circles for another use for
it. But for solving quadratic equations, it is such a good method that
it puts itself out of business.
You see, with such a mechanical method like the method of completing
the squares, why not just apply it to the general quadratic equation
and solve all quadratics in the world at once, and be done with it, and
never have to use algebra to solve a quadratic again.
Problem: Solve the equation:
Solution:
Just do it the same way with the letters as you did with the
numbers. First divide both sides by a. Then subtract c/a from both
sides to be able to see more easily what to add to the left side to
make it a perfect square. Then complete the square on the scratch paper
and add what you get to both sides. Write the left side as the perfect
square that it is. Instead of doing arithmetic on the right side you
have to do a little bit of algebra, using 4a2 as a common
denominator. Then take square roots and subtract b/2a from both sides
and use 2a a common denominator to get the final answer.
We have just solved all quadratics in the world at once and derived
the quadratic formula, which says:
For any real numbers a,b, and c, the solutions to the equation
ax2+bx+c=0
are
Solving by the
Quadratic Formula
Since this formula is somewhat long and complicated, it is best to
evaluate it in two smaller pieces by first evaluating the thing inside
the radical,
b2-4ac
and then put the result into the formula
The quantity
b2-4ac
even has a name. It is called the discriminant. And there is another
advantage to computing it first. Since it is what is in the radical, it
can't be negative if there are going to be solutions to the equation,
because you can't take a square root of a negative number, (unless you
use the imaginary numbers, and we're not yet ready for them here) so if
the discriminant comes out negative, then you don't have to do any more
work, and all you have to do is write "no solution" on your paper and
you are done. Sometimes you can determine this quite quickly by
estimating, particularly if a and c are very large and b is small.
Example 1
Problem: Solve the equation.
Solution:
Example 2
Problem: Solve the equation.
Solution: No solution. b is -2, which is very small in comparison to
a=6 and c=27, so you don't even have to compute the discriminant to see
that it is going to be negative.
Imaginary Solutions
This section is for more advanced students who know about imaginary
numbers. For a brief introduction see my article
Complex
Number Arithmetic. If you know about imaginary numbers, you don't
have to stop when you see the square root of a negative number, because
with imaginary numbers you can take the square root of a negative
number. To find the square root of any negative number you just take
the square root of the corresponding positive number and multiply it by
i, the square root of -1. This makes sense at least once you believe in
the idea that the square root of -1 is i, because of the multiplication
rule for square roots. (See
Square Roots.)
(It is customary usually to write the real number after the i when it
is a square root so that it is clear that the i is not inside the
radical.)
Once you know how to find square roots of negative numbers, you find
imaginary solutions to quadratics by the completing the square or the
quadratic formula pretty much like you find real ones. For the
following examples the instruction is to solve the equation.
Example 1:
x2+2x+5=0
Solution:
Completing the Square:
Explanation:
First we add -5 to both sides to get the constant on the right side of
the equation so that it is more clear what we need to add to the left
side to make it a perfect square. Then we complete the square. 2/2=1, 1
2=1,
so 1 is the number we add to the left side to get a perfect square.
Whatever you do to one side of an equation, you have to do to the other
side, so we also add 1 to the right side of the equation. Then we write
the left side as the perfect square that it is, and do the arithmetic
on the right side. In this equation we get a negative number on the
right side, but with imaginary numbers we can deal with that. The two
square roots of -4 are 2i and -2i, so x+1 has to be one of them. Then
to find out what x is, all we have to do is add -1 to both sides.
Quadratic Formula:
Explanation:
First compute the discriminant and find its square root. The square
root of -16 is the square root of 16 times i, 4i. Then we just fit in
the square root in its place in the formula. The numerator has a common
factor of 2 that we can factor out and cancel with the 2 in the
denominator.
Example 2:
x2+x+1=0
Completing the Square:
Explanation:
Again we first subtract 1 from both sides so that it is more clear what
we need to add. For the completing the square part, this time the
coefficient on x is 1. Half of 1 is 1/2 and (1/2)
2=1/4, so
1/4 is the completing the square number. We add it to both sides,
because anything you add to one side you have to add to the other side.
Then again we get a negative number to take plus and minus square roots
of, but we can handle that with imaginary numbers. We just break it up
into square roots of -1, 3, and 4. The square root of -1 is i, the
square root of 4 is 2, and the square root of 3 is the square root of
3. Then to get the final answer we add -1/2 to both sides.
Quadratic Formula:
Explanation:
First we figure out the discriminant, which comes out to be -3, and
then we take its square root. The square root of a negative number is
just the square root of the corresponding positive one times i. This
time we can't the square root of 3 is an irrational number, so it is
better left undone thinking of radical 3 is the name for the exact
number that you multiply by itself to get 3. Then after we have found
the square root of -3, we can put it in place of the radical in the
formula to get our final answer.
Example 3:
3x2+2x+3=0
Completing the Square:
Explanation:
In this one there is a coefficient other than 1 on the x
2,
namely 3, so first we have to get rid of it by dividing both sides by
3. Then from there it is pretty much like the other examples. Next we
add -1 to both sides to see more clearly what we need to add to make
the left side a perfect square. The coefficient on x is 2/3. To find
half of 2/3 we multiply it by 1/2 and get 1/3. Then to find the
completing the square number, we square that and get 1/9, which we add
to both sides of the equation. Then we write the left side as the
perfect square that it is and do the arithmetic on the right side. And
again since this section is about imaginary solutions, we get a
negative number on the right side of the equation to take the square
root of. Then after taking plus and minus square roots, we add -1/3 to
both sides to get the final answer.
Quadratic Formula:
Explanation:
First we find the discriminant, and we get -32. The square root of -32
is the square root of -1 times the square root of 16 times the square
root of 2. The square root of -1 is i, the square root of 16 is 4, and
the square root of 2 is something nasty and irrational, so it is left
as the square root of 2. Then we put this square root in place of the
radical in the formula and simplify to get the final answer.