# CLEP College Algebra/Polynomials
## Polynomials

A polynomial is an expression containing any number of variables and constants. The variables are combined by adding, subtracting, and multiplying. The variables themselves can be raised to a positive whole-number power.

### Types

A monomial is the product of any number of variables, each raised to any positive whole-number power. Thus, monomials do not involve addition or subtraction. Monomials may be multiplied by a constant.
These are all monomials:
* $25x^{2}$
* $7xyz^{3}$
* $x$
A binomial is the sum of two monomials.
* $x+y$
* $3x^{2}y-z^{5}$
* $2z+5$
A trinomial is the sum of three monomials (or a binomial and monomial).
* $x^{2}+4x+4$
* $x^{2}+xy+y^{2}$
* $5x+4y-8z$

### Simplifying

Simplifying a polynomial (or "collecting like terms") is the process of reducing a polynomial to its shortest form. The number before a term is the term's coefficient. Add or subtract the coefficients of terms that have the same combination of variables. That is, add or subtract the coefficients of like terms.
To make communication of monomials easier, we oftentimes use the convention of writing the variables of each term in alphabetical order, and we use exponential notation so that in each term each letter appears only once. We like to put the number (the numerical coefficient) at the beginning of the term.
If the terms are each expressed in such a manner, we can quickly identify like terms. Two terms are "like" if, when you cover up the coefficient of each term, the rest of the terms are identical to one another.
We cannot combine "unlike" terms. That is, we leave them alone.
* $3x+5y+7x+2=(3+7)x+5y+2=10x+5y+2$
* $4x^{2}-2x-x^{2}+x+4+x=(4+-1)x^{2}+(-2+1+1)x+4=3x^{2}+4$
A polynomial must be simplified before it can be classified as a monomial/binomial/trinomial/polynomial.

### Degree

We can talk about the degree of a term, or the degree of a polynomial for a certain variable. In this context, I am using "polynomial" to include monomials, binomials, and trinomials.
Most of the time, we talk about degree for polynomials that only contain one variable. In this setting, the degree of a single term is the exponent for the variable in that term. For example:
* The degree of $-5=-5x^{0}$ is zero.
* The degree of $4x=4x^{1}$ is one.
* The degree of $-12x^{5}$ is five.
For a polynomial of a single variable, the degree of the polynomial is the largest exponent that appears on that variable. The degree of $6-2x^{3}+12x+50x^{2}$ is three.
To find the leading coefficient of a polynomial, identify the numerical coefficient of the term having the largest degree. The leading coefficient of $6-2x^{3}+12x+50x^{2}$ is negative two.
(Remember, $6-2x^{3}+12x+50x^{2}=6+-2x^{3}+12x+50x^{2}$.)
To make things easier, we oftentimes like to write polynomials either in ascending or descending order. Ascending order means that the degrees of the terms ascend (get bigger)
as you go from left to right, and descending order means that the degrees of the terms descend (get smaller) as you go from left to right. When we write $6-2x^{3}+12x+50x^{2}$
in descending order, we get $-2x^{3}+50x^{2}+12x+6$.
If a polynomial is given in descending order, then the degree of the polynomial is the degree of the first term, and the leading coefficient is the number out front.

### Check Your Understanding

Note: these questions are going to be easy — they are not CLEP-type questions. As such, look at these as questions that can determine whether or not you understand the basics.
If you could answer all of these correctly. You understand the section and may move on.

## Factoring
### Common Factor

Factoring polynomials deals with picking out the common factor. Just like before when we factored a real number we apply the same idea to binomials, trinomials, and other polynomials. We assume that you don't know how to factor variables, so we will introduce the concept by analyzing the question into smaller and smaller pieces to further understanding with the example problem below. For those who know how to do this, this may seem a little bit excessive, but it is important to fully understand what these type of problems means. Plus, in mathematics, when problems are very difficult, you break it down into easier pieces until you can finally tackle the big monster that is the problem.
* Example 2.1.a: Factor the expression $x^{8}+x^{5}$.
* Notice that each term in the expression has an $x$ with no coefficients. If you have not memorized exponent rules, please do! The reason for that memorization is to simplify the process. When multiplying two terms such that $a^{p}a^{q}$, the result of the expression is $a^{p+q}$. Thus, you want to have some $x^{n}$ that when distributed onto every term in the parentheses, you get the same expression above. Let us set that up now:
* $x^{n}\left(x^{a}+x^{b}\right)$.
* While this seems like a complicated way to look at it, a simple tasked is asked of you. In short, $x^{n}\left(x^{a}+x^{b}\right)=x^{n}x^{a}+x^{n}x^{b}$. Because $a^{p}a^{q}=a^{p+q}$, each term in $x^{n}x^{a}+x^{n}x^{b}$ has the same basic structure. Ergo,
* $x^{n+a}+x^{n+b}$.
* Here we have what the question is actually asking us to figure out: $x^{n+a}+x^{n+b}=x^{8}+x^{5}$. Because $x$ is always equal to itself, yet the exponents are not, we may further rewrite the problem like so:
* ${\begin{cases}n+a=8\\n+b=5\end{cases}}$
* Since $n$ is in the system of equations twice, it may be easier to eliminate $n$ from the system. In that case, multiply $-1$ to the equation (2). After, add equation (1) to equation (2):
* (3): $a-b=3$
* You could keep going, but you are going to find out some hard truths, and you probably have no time to waste getting every thing done. If you want a proof that what you are doing is futile, read the note.$^{[Note1.]}$ What most problems mean by factoring an expression is to simply make it so that equation (3) is easy to solve. That is, let $b=0$. From there:
* $a-(0)=3$
* $a=3$
* Because we allowed these two truths to exist, we can substitute these two values into the systems to find that $n=5$. This option was very arbitrary (as you would have learned if you read note 1). Nevertheless, this is what most problems want you to do when factoring an expression with no coefficients. Allow $n$ to equal the smallest power value in the expression. Either way:
* $x^{5+3}+x^{5+0}=x^{8}+x^{5}$
* $x^{5}x^{3}+x^{5}x^{0}=x^{5}\left(x^{3}+1\right)=x^{8}+x^{5}\blacksquare$.
The biggest truth you should have learned is when factoring an expression with no coefficients, you are really being asked to find the greatest common factor, and you do that by factoring the variable in the problem to the smallest power value (highlighted in ${\color {Red}{\text{red}}}$). Here are a few examples:
* $b^{18}+b^{3}-b^{\color {Red}2}=b^{2}\left(b^{16}+b-1\right)$
* $x^{8}+x^{5}+x^{\color {Red}4}=x^{4}\left(x^{4}+x+1\right)$
* $z^{6}+z^{\color {Red}3}=z^{3}\left(z^{3}+1\right)$
* $p^{\frac {1}{3}}+p^{\color {Red}{\frac {1}{4}}}=p^{\frac {1}{4}}\left(p^{\frac {4}{3}}+1\right)$
But what about when factoring with coefficients. This is a little bit more complicated, but it works the same either way.
* Example 2.1.b: Factor the expression $42x^{3}+12x^{2}+24x$.
* Here, we should be focusing on the coefficients before the exponents. If we were to do that, we would analyze this small problem first:
* ${\text{GCF}}(42,12,24)$.
* If you were to notice (or use a calculator), the largest value that is a factor of the numbers within is $6$. Let us go ahead and factor that into our expression:
* $6\left(7x^{3}+2x^{2}+4x\right)$
* The coefficients should not matter if you factor because when multiplying the expression $\left(ca^{p}\right)a^{q}$, where $c$ is some constant, as per the associative property, $\left(ca^{p}\right)a^{q}=c\left(a^{p}a^{q}\right)$. From there, multiplying one term by a constant does not matter: $c\left(a^{p}a^{q}\right)=c\left(a^{p+q}\right)=ca^{p+q}$.$^*$
* Therefore, we can apply the same general rule we discovered for Example 2.1.a:
* $42x^{3}+12x^{2}+24x=6x(7x^{2}+2x+4)\blacksquare$
* *Even if the other value is multiplied by another arbitrary constant $d$, so long as the commutative property is a thing, $\left(ca^{p}\right)\left(da^{q}\right)=ca^{p}da^{q}=cda^{p}a^{q}=cda^{p+q}$.
This procedure outlined above seems to work for any polynomial. Let's try it on a few:
* $3b^{18}+12b^{3}-6b^{2}=3b^{2}\left(b^{16}+4b-2\right)$
* $12x^{8}+{\frac {1}{16}}x^{5}-{\frac {1}{4}}=4\left(3x^{8}+{\frac {1}{64}}x^{5}-{\frac {1}{16}}\right)$
* $6z^{6}4z^{3}+2=2\left(3z^{6}+2z^{3}+1\right)$
We may now synthesize the information we learned from these two problems to outline a general procedure:
Given a polynomial with coefficients and variables, the following procedure should be followed.
* Find the greatest common factor for each of the coefficients.
* If there is no constant (a value that has no variable attached to it), factor the variable to the lowest power value in the expression. If there is a constant, simply keep the greatest common factor outside the parentheses.
You are now ready to fully factor any expression with a common term.

### Grouping

When there is no common term that travels throughout the entire polynomial you can factor by grouping. When factoring by grouping you need to split up the polynomial into two binomials.
* Example 2.2.a: Factor the expression $x^{3}+x^{2}+2x+4$.
* Before we group, we need to do a quick check to see if we can factor the entire expression with just one term outside the parenthesis. If "4" was not a constant, we could factor the expression using the second step of the procedure. Another thing is that ${\text{GCF}}\left(1,1,2,4\right)=1$, which if we were to factor, that would mean that we are multiplying the same thing by 1, which is not very helpful.
* What are we to do then? We could factor by putting parts of the expression that have something similar together. This is harder to explain than do, so follow along with us. First, we are going to rewrite the expression. However, instead of keeping it black, we are going to recolor the expression with two groups of colors, red and green:
* ${\color {Red}x^{3}+x^{2}}+{\color {Green}2x+4}$.
* First, we are going to factor the red bit, ${\color {Red}x^{3}+x^{2}}$. Notice that this part of the expression has a common factor $x^{2}$. Factor that bit out and leave it to the side:
* $x^{3}+x^{2}$
* $\Rightarrow {\color {Red}x^{2}\left(x+1\right)}$
* From there we group the second binomial (in green) from the polynomial: ${\color {Green}2x+4}$. Notice the common factor is $2$, so factor that bit:
* $2x+4$
* $\Rightarrow {\color {Green}2\left(x+4\right)}$
* With these two bits factored, put them together; after all, they were part of the same expression:
* ${\color {Red}x^{3}+x^{2}}+{\color {Green}2x+4}$.
* $\Rightarrow {\color {Red}x^{2}\left(x+1\right)}+{\color {Green}2\left(x+4\right)}\blacksquare$.
* You are now finished. The concept is simple, although some problems may be a little bit more difficult than others.
Notice that we factored two binomials. Would it work if we were to factor a trinomial and then a binomial? We will answer that in a little bit. For now, try the next problem below, where we group polynomials with different variables.
* Example 2.2.b: Factor the expression $x^{2}y^{3}+2x^{2}y+4xy^{3}+8xy$.
* As before, we need to do a quick check to see if we can factor the entire expression with just one term outside the parenthesis. First, ${\text{GCF}}\left(1,2,4,8\right)=1$, which if we were to factor, that would mean that we are multiplying the same thing by 1, which is not very helpful. However, because there is an $xy$ inside the expression in some form, we could factor the entire expression like this:
* $xy\left(xy^{2}+2x+4y^{2}+8\right)$.
* We are not done however. Notice that you could still group the polynomial inside the parentheses with common terms. The $xy$ may seem to complicate things; however, you can simply ignore it and say you are working on the inside of the parentheses. If you do get easily confused when too many things are on the paper or screen, it may be helpful to ignore them but always be sure to come back to them. Let us rewrite the expression inside of the parentheses in the same way we did in Example 2.2.a:
* ${\color {Red}xy^{2}+2x}+{\color {Green}4y^{2}+8}$.
* Looking at the red term $\left({\color {Red}xy^{2}+2x}\right)$, there is a common factor of $x$ with both terms, and ${\text{GCF}}\left(1,2\right)=1$, so we will factor $1x=x$ outside the red term:
* $\left(xy^{2}+2x\right)$
* ${\color {Red}x\left(y^{2}+2\right)}$
* As before, do the green term ${\color {Green}4y^{2}+8}$. Look at the coefficients and constants first: ${\text{GCF}}\left(4,8\right)=4$. We found a factor! As per the definition of constant, there is no variable and thus nothing to factor. Therefore, we can now factor that bit:
* $4y^{2}+8$.
* ${\color {Green}4\left(y^{2}+2\right)}$.
* Finally, put everything together, including the $xy$ term we ignored for a large part of the problem. In the spirit of not confusing the reader, the red and green parts will be placed inside the brackets "":
* $xy\left[{\color {Red}x\left(y^{2}+2\right)}+{\color {Green}4\left(y^{2}+2\right)}\right]$.
* For the more astute readers, you may have noticed that $y^{2}+2$ is multiplied to each term inside the square brackets. In case you do not see it, let $y^{2}+2=C$. If we were to replace the inside of the brackets like so (we are ignoring the colors since they are unnecessary for this part of the problem)
* $xy\left(xC+4C\right){\text{,}}$
* we would notice that each term is multiplied by C, which is a factor of the expression and must be separated like so:
* $xy\left[C\left(x+4\right)\right]$.
* Remembering that we let $y^{2}+2=C$, we substitute that back in and get
* $xy\left[\left(y^{2}+2\right)\left(x+4\right)\right]$.
* Finally, because of the associative property, we may ignore the large square brackets (but keep the parentheses because anything inside the parentheses must be done first before multiplying them:
* $xy\left(y^{2}+2\right)\left(x+4\right)\blacksquare$
This problem was a little bit more involved than expected. Is there an easier way to do the green and red bits? Yes, and it is a method called F.O.I.L (Firsts, Outside, Insides, Lasts). Here is what we mean by foil (see right):
By remembering the foil method we can move backwards and solve this problem: $xy^{2}+2x+4y^{2}+8$.
We know that we multiply "firsts" with no coefficients. It is easier to :
    $\left(x+\right)\left(y^{2}+\right)$.
From there we go "outsides". We see that the first term $x$ is a multiple to the second term, $2x$, in the first binomial. So we get
    $\left(x+\right)\left(y^{2}+2\right)$.
Next, "insides": we see $y^{2}$ is a multiple of $4$. Therefore, we get
$(x+4)(y^{2}+2)$
In fact, we are finished. Notice that "lasts" is $4\cdot 2$, which gives us $8$, the last term of the polynomial.
Keep in mind, this trick doesn't always work because the middle terms often end up having the same common variables and get simplified. It's helpful to start with the first terms and then go to the last terms. If you can get these two things you should be able to find the middle terms. Another thing to note is that we had to factor $xy$ to make this work. While it could be possible to do the original problem like this, it is much easier to use FOIL when the last term does not have any variables. Before we move on to the next section, we must answer one final pressing question that we asked at the beginning of this section.
Factoring by grouping: a trinomial then a binomial? This question is fundamental to the curious student. Let us try it out using Example 2.2.a:
    $x^{3}+x^{2}+2x+4$.
Let us factor the trinomial: $x^{3}+x^{2}+2x=x\left(x^{2}+x+2\right)$. Next, factor the monomial: $4=2\left(2\right)$. Now put them together:
    $x\left(x^{2}+x+2\right)+2\left(2\right)$.
It seems to functionally work the same. In fact, it gives you the same answer. This should make sense because how you group anything does not change the answer (remember, associative property). However, it is standard mathematical syntax to factor a polynomial into two binomials. Because the CLEP exam is multiple choice, it should be easy to tell what the question is asking you to do. Either way, we have a procedure outlined for you again:
Given a polynomial with coefficients and variables, the following procedure should be followed.
* Find the greatest common factor for each of the coefficients.
* If there is no constant (a value that has no variable attached to it), factor the variable to the lowest power value in the expression. If there is a constant, simply keep the greatest common factor outside the parentheses.
* Group the polynomial into two binomials, and apply steps 1 and 2 to the different groupings. Do this separately for the two groupings.
* After completely factoring the two binomials. Put them together. If there is a common factor with the two combined binomials, factor it.
The procedure outlined above is best demonstrated in Example 2.2.b, and it does have a new: factoring by grouping. Simply look back at that example and apply each and every step onto that polynomial. Once you have done that, you now fully understand grouping polynomials.

### Trinomials

It may seem strange to start factoring larger expressions only to then move back to the trinomial. However, there is a reason why the book is arranged the way it is. Trinomial factoring may be the most difficult aspect of the journey to, ultimately, solve equations involving degrees higher than 1. Nevertheless, this difficult concept is necessary for the college algebra student, especially for the next two sections of the "factoring" section.
As before, we will introduce the concept by exploring the consequences and behaviors that a mathematician may have first discovered techniques to solve. First, let us apply our algorithm and see if it applies to problems like these.
* Example 2.3.a: Factor the expression $x^{2}+x-2$.
* ${\text{GCF}}(1,1,-2)=1$.
* We can only factor $x^{0}=1$ for the following expression.
* Notice how our algorithm is confused at steps 3 and 4. Rightly, it should be because our algorithm assumes that we are factoring by grouping, which is not always applicable to all situations, such as this one. However, we can "force" the algorithm to fit into this situation. For example, we can try making the middle term split up into two terms. That is, we set $x=(f_{1}+f_{2})x=f_{1}x+f_{2}x$, where
* (3.2.3.1)
* $f_{1}+f_{2}=1$
* However, if we are to get anywhere with this, we want the middle term to have common factors. This is an interesting dilemma!
* Our ultimate end goal is to use the algorithm we have used previously on the trinomial above to get a factored form such the following is true:
* ${\begin{aligned}x^{2}+x-2&=x^{2}+f_{1}x+f_{2}x-2\\&=x(x+f_{1})+c(x+f_{1})&{\text{where }}c{\text{ is some constant multiple.}}\\&=(x+c)(x+f_{1})\end{aligned}}$
* However, notice how we got this result. If we want this to be factored, then $(x+f_{1})$ must be a factor of this trinomial. The question is, what is $c$? This is the ultimate question. To answer this, we need to analyze this application of the algorithm carefully. Since $f_{2}x-2$ is grouped together, we want to find a greatest common factor for $x$ and for $-2$. Ultimately, this means $f_{2}$ is the greatest factor of the grouped expression. Otherwise, it would be impossible to get $(x+f_{1})$ as a factor of the expression.
* Therefore, $c=f_{2}$. This tells us a very important truth about factoring the above expression:
* (3.2.3.2)
* $f_{1}f_{2}=-2$
* This is a result of applying our algorithm! Using what we know, let us rewrite the above problem in terms of what we know: $x^{2}+x-2=x^{2}+(f_{1}+f_{2})x-f_{1}f{2}$, where $-2=f_{1}f_{2}$ and $1=f_{1}+f_{2}$. LOOK AT THIS! We can use a systems of equations!
* ${\begin{cases}1=f_{1}+f_{2}\\-2=f_{1}f_{2}\end{cases}}$
* For. the purposes of saving time, we will skip through the process of finding those factors. This can be trivially done with a "guess-and-check," but a technique for finding this factor will be explained later. For now, just thank us when we tell you the factors are $f_{1}=-1$ and $f_{2}=2$.
* Using this result, we can now definitively use the same algorithm as before, but through some "fudging" or adjustments to the base expression we were solving for. Here is the process in action:
* ${\begin{aligned}x^{2}+x-2&=x^{2}-x+2x-2\\&=x(x+1)-2(x+1)\\&=(x-2)(x+1)\blacksquare \end{aligned}}$
Example 2.3.a showed us a very important algorithm that is taught all around the world. It is called the ac-method or the diamond method, the steps for which we will outline below.
Given a trinomial of the form $ax^{2}+bx+c$, with $a\neq 0$, the following procedure should be followed.
* Find the greatest common factor for each of the coefficients.
* If there is no constant (a value that has no variable attached to it), factor the variable to the lowest power value in the expression. If there is a constant, simply keep the greatest common factor outside the parentheses.
* Find two values $f_{1}$ and $f_{2}$ whereby $ac=f_{1}f_{2}$ and $b=f_{1}+f_{2}$.
* Rewrite the trinomial into the form $ax^{2}+f_{1}x+f_{2}x+c$; then, group the polynomial into two binomials, and apply steps 1 and 2 to the different groupings. Do this separately for the two groupings.
* After completely factoring the two binomials. Put them together. If there is a common factor with the two combined binomials, factor it.
You should have realized by now that the ac-method is a modified version of the factoring by grouping method. This is why we decided to show factoring trinomials later, because the work involved is actually more than what you would expect from a carefully designed polynomial.
[More examples will be added later.]

### Difference of Two Squares

So far in our factoring journey, we tried factoring general expressions that are not usually commonly seen. Despite that, there is a procedure that almost always works. Similarly, there are specialized cases in which a formula exists. It is the hope of this Wikibook that you understand why the formula is the way it is so that you may not simply blindly apply some seemingly unrelated relation.