Solving Equations and Factoring Polynomials

In Algebra, there are two types of things we study: expressions and statements. Expressions are the nouns or noun phrases of mathematics: x2+1. Statements are the sentences: x2+1 = 3. This becomes more clear when you write these out in words: "x squared plus one" has no verb in it, it just describes an object. But "x squared plus one equals three" is a complete sentence: it has a verb, "equals".

In this interactive, we'll be exploring the following three tasks for quadratic polynomials (polynomials of the form ax2+bx+c): Enter a polynomial below and compare the answers:
x2 +x +

The Quadratic Formula

There's a simple formula for finding the roots of a quadratic polynomial: x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2-4ac}}{2a} The ± means there are two solutions: one with a plus and one with a minus. Specifically: x=b+b24ac2aorx=bb24ac2ax = \frac{-b \colorbox{#CCDDAA}{$+$} \sqrt{b^2-4ac}}{2a} \qquad\text{or}\qquad x = \frac{-b \colorbox{#CCDDAA}{$-$} \sqrt{b^2-4ac}}{2a} Note that this doesn't make sense (you wind up dividing by 0) if a = 0. Then again, if a = 0, you have a linear equation, which you should know how to solve already.

What kind of answer you get depends on the value of b2-4ac. This value is called the discriminant of the quadratic polynomial.
If you enter these formulas into your calculator, you'll get a decimal approximation. This is sometimes very useful: it gives you a sense of where these numbers fall on a number line, which is really useful, for instance, if you want to locate the x-intercepts in the process of drawing a graph. However, this is a one-way process. Once you have your decimal approximation, if you lose track of where it came from, you can't really reconstruct the nice formula that gave you that decimal approximation. So if you need more digits, you're out of luck. Mathematicians prefer to leave their answers as a formula and not as a decimal approximation.

Key Skills Practice: Identifying a, b, and c

Identify a, b, and c in the quadratic polynomials below:
a =
b =
c =

Key Skills Practice: Square Roots

If we're going to leave our answers as formulas, we should try to simplify them! Perhaps they'll become easier to work with or give us insights into their values. Your first target of simplification is the square root.

When you encounter the square root of an integer, the first thing you should do is see if it's negative. Taking the square root of a negative number requires the use of complex numbers, so you should think about whether it makes sense to have a complex number answer. For instance, if you're looking for an x-intercept, that has to be some point on the real number line of the x-axis, so it can't be a complex number. If the term under the square root is negative, you can make it positive and multiply the square root by i: a=ai\sqrt{-a} = \sqrt{a}i. It's up to you if you want to write the i before or after the square root (order of multiplication doesn't matter!). I like writing it after the square root, but you need to be careful not to write the i under the square root!

Once you've gotten the term under the square root to be positive, find the largest square factor of it that you can. It might help to completely factor the number. Pull that square factor out of the square root while at the same time taking its square root: a2b=a2b=ab\sqrt{a^2 b} = \sqrt{a^2}\sqrt{b} = a \sqrt{b}. The interactive below will allow you to practice:

Warning: Order of Operations!

Once you've broken up your square root, your answer might wind up looking like: 2+264\frac{2+2\sqrt{6}}{4} It's tempting to try to combine the 2+2 to get 4, but it becomes clear that you can't if you add in the "hidden parentheses": 2+(26)4\frac{2+\left(2\sqrt{6}\right)}{4} Order of operations means there is a hidden set of parentheses telling us to multiply 2 times the square root of 6 first before we add two to it. These parentheses break up the 2+2 that we were tempted to add together, and hopefully we're less tempted to combine them now!

Warning: Cancelling in Fractions!

Once we've dealt with the square root, our next step is to cancel out any common factors between the numerator and denominator. When cancelling in fractions, if the numerator or denominator is a sum, we need to look at all the summands when deciding what to cancel and when cancelling.

You can practice simplifying the results of applying the quadratic formula under the "Practice" section below

From Roots to Factoring

Once we've found our roots, we can figure out a factorization of our polynomial. If we let r and s be our roots, then our polynomial factors as ax2+bx+c = a(x-r)(x-s). But that's only if we've found our roots already. We combine this with the quadratic formula below: ax2+bx+c=a(xb+b24ac2a)(xbb24ac2a)ax^2+bx+c = a\left(x-\frac{-b+\sqrt{b^2-4ac}}{2a}\right)\left(x-\frac{-b-\sqrt{b^2-4ac}}{2a}\right) This makes sense: after all, a(x-r)(x-s) has the roots we want it to have: r and s, and you can check that the right hand side really does expand out to ax2+bx+c, if you're patient.

Solving Quadratic Equations

A Quadratic Equation is an equation where both sides are quadratic or lower degree polynomials in the same variables. So far, we know how to solve quadratic equations where one side is 0 (equations of the form ax2+bx+c = 0), but what about equations where both sides are polynomials?

Our approach is simple: subtract terms from one side until there's nothing left. Then you'll get an equation of the form ax2+bx+c = 0, which we can then solve using the quadratic formula.

Practice!

Select one (or many) types of problems to practice:
Finding roots problems
Solving quadratic equations problems
Factoring problems
Simplifying results of the quadratic formula
Type of solutions to include:
Include complex solutions
Include solutions with square roots
Use variables other than x
Use larger numbers in problems
To enter an answer, first select a template from the drop down menu, then enter the appropriate numbers into the boxes.

Bonus: Where Did the Quadratic Formula Come From?

The sections below are extra, in case you are curious about the origins of the Quadratic Formula.
The difficulty in solving the equation ax2+bx+c = 0 is that there are two xs. If we had one x, we could isolate it on one side by moving everything else to the other side. But try as we might, we can't get an x by itself without the other x causing trouble on the other side. And we want our solution for x to not have an x in it. It's bnot much of a big win if we need to know x to plug it in to solve for x.

The solution is quite clever: if we can rewrite our equation to have a perfect square trinomial in it (a quadratic of the form x2+2yx+y2) we can rewrite the perfect square trinomial as the square of a binomial (which has only one x in it!). ax2+bx+c=0x2+bax+c=0dividing both sides by ax2+bax=csubtracting  from both sidescx2+2b2ax=cmultiply and divide by 2x2+2b2ax+(b2a)2=ca+(b2a)2the left hand side is the start of a perfect square trinomial. adding  to both sides completes it(b2a)2(x+b2a)2=ca+(b2a)2write left hand side (a perfect square trinomial) as a square(x+b2a)2=4ac4a2+b24a2multiply by , square fraction4a4a(x+b2a)2=b24ac4a2rewriting right hand sidex+b2a=±b24ac2ataking the square root of both sides (note that you must add a  to one side)±x=b±b24ac2asubtracting  from both sidesb2a\begin{alignedat}{4} ax^2 + bx + c &= 0 &\qquad&\\ x^2 + \frac{b}{a}x + c &= 0 && \text{dividing both sides by $a$}\\ x^2 + \frac{b}{a}x &= -c && \text{subtracting $c$ from both sides}\\ x^2 + 2\frac{b}{2a}x &= -c && \text{multiply and divide by 2}\\ x^2 + 2\frac{b}{2a}x + \left(\frac{b}{2a}\right)^2 &= -\frac{c}{a} + \left(\frac{b}{2a}\right)^2 && \text{the left hand side is the start of a perfect square trinomial. adding $\left(\frac{b}{2a}\right)^2$ to both sides completes it}\\ \left(x+\frac{b}{2a}\right)^2 &= -\frac{c}{a} + \left(\frac{b}{2a}\right)^2 && \text{write left hand side (a perfect square trinomial) as a square}\\ \left(x+\frac{b}{2a}\right)^2 &= -\frac{4ac}{4a^2} + \frac{b^2}{4a^2} && \text{multiply by $\frac{4a}{4a}$, square fraction}\\ \left(x+\frac{b}{2a}\right)^2 &= \frac{b^2-4ac}{4a^2} && \text{rewriting right hand side}\\ x+\frac{b}{2a} &= \pm \frac{\sqrt{b^2-4ac}}{2a} && \text{taking the square root of both sides (note that you must add a $\pm$ to one side)}\\ x &= \frac{-b \pm \sqrt{b^2-4ac}}{2a} && \text{subtracting $\frac{b}{2a}$ from both sides} \end{alignedat} Wikipedia has a number of other derivations of the quadratic formula and some historical information about it.

Another Approach: Factoring Directly

The questions below are progressive: data presented to you in one problem is based on your answers to previous problems.

Suppose we want to factor the polynomial . New Polynomial:
Let's start by completing the square, rewriting our expression with two instances of the variable x to one with just one. Choose constants below so that the expression, when expanded out (the current polynomial) matches the target polynomial.
Target:
Current:
(x+)2+
You might recognize this as a difference of squares. The principle of universal substitution says that, since we know that (y2z2)=(y+z)(yz)(y^2-z^2)=(y+z)(y-z) for any numbers y and z, we can replace a and b on both sides of that equality by any algebraic expressions that represent numbers and get a new true equality. As you enter formulas in the corresponding text boxes below, this interactive will do that substitution for you. Choose appropriate values to substitute for y and z to get the left hand side of the lower formula to agree with the target.
Substitution: y →
z →
Current:
Target:
We know that the left hand and right hand sides of the formula produced by our substitution are equal, so our original polynomial is equal to the right hand side of the lower equation above. Simplify the right hand side of the lower equation below: (be sure to keep the same order of the binomials as above, or the parser will be unhappy).
Rewrite: (x + )(x + )
This technique is a bit more complicated than the guess and check technique of finding two numbers that multiply to the constant term and add to the coefficient of x, but it has a number of advantages: Usually when you encounter a math problem in class, it has been specifically chosen to be an nice problem with a nice solution. But math problems in the wild are rarely so nice. Having a variety of tools in our toolkit (in this case, our factoring toolkit) prepares us to deal with a wide variety of problems.

Solving the General Case

Let's add one more tool to our toolkit, this time replacing the numbers in our original problem with variables (b and c). Work through the problems above again, except this time leaving your answers as formulas in terms of b and c. I'll leave the original problems up so you can try out specific numbers when trying to find a formula. For each problem, think about how you solved the problem with specific numbers: how the answer you entered was related to the original polynomial and the answers you gave previously.
Show general problem
If you would like to skip this step:

Reflecting on the General Case

Now that we've worked out the general formula, we can substitute whatever we like in for b and c and get a factorization!
Substitution: b →
c →
Answer From Above:
Result:

What about a?

If the coefficient of x2 isn't 1, we can factor our polynomial (ax2 + bx + c) by first factoring out an a, to leave us with: a(x2+bax+ca)a\left(x^2+\frac{b}{a}x+\frac{c}{a}\right) Which we can then factor by substituting b/a for b and c/a for c in the interactive above. ax2+bx+c=a(x2+bax+ca)factoring out a=a(x+b2a+b24ac4a2)(x+b2ab24ac4a2)substituting ,  abovebbacca=a(x+b2a+b24ac4a2)(x+b2ab24ac4a2)rule for square root of fraction=a(x+b2a+b24ac2a)(x+b2ab24ac2a)rule for square root of square=a(x+b2a+b24ac2a)(x+b2ab24ac2a)switching if a < 0=a(x+b+b24ac2a)(x+bb24ac2a)combining fractions\begin{alignedat}{4} & ax^2 + bx + c &\qquad&\\ =& a\left(x^2 + \frac{b}{a}x + \frac{c}{a}\right) && \text{factoring out $a$}\\ =& a\left(x + \frac{b}{2a} + \sqrt{\frac{b^2-4ac}{4a^2}} \right)\left(x + \frac{b}{2a} - \sqrt{\frac{b^2-4ac}{4a^2}} \right) && \text{substituting $b \rightarrow \frac{b}{a}$, $c \rightarrow \frac{c}{a}$ above}\\ =& a\left(x + \frac{b}{2a} + \frac{\sqrt{b^2-4ac}}{\sqrt{4a^2}} \right)\left(x + \frac{b}{2a} - \frac{\sqrt{b^2-4ac}}{\sqrt{4a^2}} \right) && \text{rule for square root of fraction}\\ =& a\left(x + \frac{b}{2a} + \frac{\sqrt{b^2-4ac}}{|2a|} \right)\left(x + \frac{b}{2a} - \frac{\sqrt{b^2-4ac}}{|2a|} \right) && \text{rule for square root of square}\\ =& a\left(x + \frac{b}{2a} + \frac{\sqrt{b^2-4ac}}{2a} \right)\left(x + \frac{b}{2a} - \frac{\sqrt{b^2-4ac}}{2a} \right) && \text{switching if a < 0}\\ =& a\left(x + \frac{b + \sqrt{b^2-4ac}}{2a} \right)\left(x + \frac{b -\sqrt{b^2-4ac}}{2a} \right) && \text{combining fractions}\\ \end{alignedat}