Solving quadratic equations
A quadratic equation
is an equation whose sides are both polynomials of degree at most 2.
You can also say that
an equation is quadratic in a particular variable
if it would become a quadratic equation upon
replacing all of the other variables with specific constants
(no matter which constants you chose).
A quadratic equation in one variable can always be solved,
or more generally an equation that is quadratic in a variable
may be solved for that variable,
over the complex numbers
(and therefore over the real numbers by throwing out imaginary solutions).
There are two main methods for doing this.
The most basic method uses these steps:
- Simplify both sides (if necessary).
- If there are any variable terms on the right-hand side,
then subtract these terms from both sides (and simplify).
- If there are no variable terms left in the equation,
then you have a statement that is always true or always false,
and that is your final answer;
otherwise continue below.
- If there is a constant term on the left-hand side,
then subtract this term from both sides (and simplify).
- If there is now a coefficient (or just a minus sign)
on the leading term on the left-hand side,
then divide both sides by that coefficient (or −1) (and simplify).
- If the left-hand side is linear, then you should have the answer now;
otherwise continue below.
- If there is more than one term on the left-hand side,
then add a constant to both sides
that makes the left-hand side into a perfect square;
this step is called completing the square.
- If there is more than one term on the left-hand side,
then factor the left-hand side (while you simplify the right-hand side).
- Take square roots of both sides
(and simplify with ± on the right-hand side).
- If there is now a constant term on the left-hand side,
then subtract this term from both sides (and simplify).
At this point, you should have the answer.
Alternatively, you can use this method:
- Simplify both sides (if necessary).
- If there are any terms at all on the right-hand side,
then subtract these terms from both sides (and simplify).
- If the left-hand side is linear,
then solve the equation using a method for linear equations;
otherwise use the quadratic formula below.
The quadratic formula says
that the following two statements are equivalent:
- ax2 +
bx + c =
0,
and a ≠ 0;
- x =
[−b ±
√(b2 −
4ac)]/(2a).
(Notice that a ≠ 0 precisely when the equation is nonlinear.)
This formula may be derived by applying the first set of steps
to the generic equation
ax2 +
bx + c =
0.
The quadratic formula
can introduce rounding errors when a is close to zero,
and you might also be in a situation
where you don't know whether a is zero or not;
for alternative versions of the quadratic formula
that can be applied as long as
at least one of a, b, and c is nonzero
(and which tends to avoid rounding errors
as long as at least one of them is far from zero),
see
The
numerical analyst's quadratic formula
(optional, on an external site with fancy formatting possibilities).
Finally, you can try to solve the equation by factoring.
That's usually the fastest way when it works, but it doesn't always work;
the other two methods are guaranteed to work every time.
Go back to the course homepage.
This web page was written between 2007 and 2017 by Toby Bartels,
last edited on 2017 November 8.
Toby reserves no legal rights to it.
The permanent URI of this web page
is
http://tobybartels.name/MATH-1100/2019FA/equations/
.