
<h1 style="color: green;">Factoring Trinomials</h1>
<h2 style="color: green;">Factor a Second-degree Polynomial: x<sup>2</sup> + Bx + C</h2>

{{{
%hideall
#auto
def int_who_prod(n):
    d_of_n = divisors(n)
    length = len(d_of_n)
    if n > 0:
        if is_even(length):
            return [(d_of_n[i//2],d_of_n[length-1-i//2]) if is_even(i) else (-d_of_n[i//2],-d_of_n[length-i//2-1]) for i in range(length)]
        else:
            return [(d_of_n[i//2],d_of_n[length-1-i//2]) if is_even(i) else (-d_of_n[i//2],-d_of_n[length-i//2-1]) for i in range(length + 1)]
    if n < 0:
        if is_even(length):
            return [(d_of_n[i//2],-d_of_n[length-1-i//2]) if is_even(i) else (-d_of_n[i//2],d_of_n[length-i//2-1]) for i in range(length)]
        else:
            return [(d_of_n[i//2],-d_of_n[length-1-i//2]) if is_even(i) else (-d_of_n[i//2],d_of_n[length-i//2-1]) for i in range(length + 1)]
def sum_list(ilist):
    return [sum(ilist[i]) for i in range(len(ilist))]
def visual_factor_BCform(B,C):
    g.<x> = PolynomialRing(ZZ)
    f = x^2 + B*x + C
    if f.is_irreducible():
        print "This quadratic is un-factorable."
        return
    if B == 0:
        print "B must be non-zero"
        return
    if type(B) != Integer or type(C) != Integer:
        print "B and C must be integers."

    pwholist = int_who_prod(C)
    sl = sum_list(pwholist)
    length = len(sl)

    string = "<html>"
    string += """
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;     
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
"""
    string += "<p>Factor completely: "
    inputq = "x<sup>2</sup>"
    if B > 0:
        if B != 1:
            inputq += " + %dx" % B
        else:
            inputq += " + x"
    else:
        if B != -1:
            inputq += " - %dx" % (B*-1)
        else:
            inputq += " - x" 
    if C > 0:
        inputq += " + %d" % C
    else:
        inputq += " - %d" % (C*-1)
    string += inputq +"</p>"

    string += "<h3 style=\"color: green;\">Solution</h3>"

    string += "<p>First, determine all integer pairs whose product is %d and then compute each sum.</p>" % C


    string += "<div class=\"pst\"><table><tr><td class=\"label1\">Integer pairs whose product is %d</td>" % C
    for i in range(length):
        if sl[i] != B:
            string += "<td class=\"prods\">%d,%d</td>" % (pwholist[i][0],pwholist[i][1])
        else:
            string += "<td class=\"prods\" style=\"background: orange;\">%d,%d</td>" % (pwholist[i][0],pwholist[i][1])
            a = pwholist[i][0]
            b = pwholist[i][1]
    string += "</tr><tr><td class=\"label\">Sum</td>"
    for i in range(length):
        if sl[i] != B:
            string += "<td class=\"sums\">%d</td>" % sl[i]
        else:
            string += "<td class=\"sums\" style=\"background: orange;\">%d</td>" % sl[i]
    string += "</tr></table></div>"

    string += "<p>Since %d is the coefficient of the middle term, " % B
    string += inputq + " = " 

    if a > 0:
        p1 = "(x + %d)" % a
    else:
        p1 = "(x - %d)" % (a*-1)
    if b > 0:
        p2 = "(x + %d)" % b
    else:
        p2 = "(x - %d)" % (b*-1)
    if p1 != p2:    
        string += p1 + p2 + "</p>"
    else:
        string += p1 + "<sup>2</sup></p>"

    string += "</html>"
    print string
    return
///
CPU time: 0.00 s,  Wall time: 0.00 s
}}}

{{{
visual_factor_BCform(-7,12)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> - 7x + 12</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is 12 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is 12</td><td class="prods">1,12</td><td class="prods">-1,-12</td><td class="prods">2,6</td><td class="prods">-2,-6</td><td class="prods">3,4</td><td class="prods" style="background: orange;">-3,-4</td></tr><tr><td class="label">Sum</td><td class="sums">13</td><td class="sums">-13</td><td class="sums">8</td><td class="sums">-8</td><td class="sums">7</td><td class="sums" style="background: orange;">-7</td></tr></table></div><p>Since -7 is the coefficient of the middle term, x<sup>2</sup> - 7x + 12 = (x - 3)(x - 4)</p></html>
}}}

{{{
visual_factor_BCform(-8,6)
///
This quadratic is un-factorable.
}}}

{{{
visual_factor_BCform(1,-12)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + x - 12</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is -12 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is -12</td><td class="prods">1,-12</td><td class="prods">-1,12</td><td class="prods">2,-6</td><td class="prods">-2,6</td><td class="prods">3,-4</td><td class="prods" style="background: orange;">-3,4</td></tr><tr><td class="label">Sum</td><td class="sums">-11</td><td class="sums">11</td><td class="sums">-4</td><td class="sums">4</td><td class="sums">-1</td><td class="sums" style="background: orange;">1</td></tr></table></div><p>Since 1 is the coefficient of the middle term, x<sup>2</sup> + x - 12 = (x - 3)(x + 4)</p></html>
}}}

{{{
visual_factor_BCform(2,1)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + 2x + 1</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is 1 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is 1</td><td class="prods" style="background: orange;">1,1</td><td class="prods">-1,-1</td></tr><tr><td class="label">Sum</td><td class="sums" style="background: orange;">2</td><td class="sums">-2</td></tr></table></div><p>Since 2 is the coefficient of the middle term, x<sup>2</sup> + 2x + 1 = (x + 1)<sup>2</sup></p></html>
}}}

{{{
visual_factor_BCform(3,-40)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + 3x - 40</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is -40 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is -40</td><td class="prods">1,-40</td><td class="prods">-1,40</td><td class="prods">2,-20</td><td class="prods">-2,20</td><td class="prods">4,-10</td><td class="prods">-4,10</td><td class="prods">5,-8</td><td class="prods" style="background: orange;">-5,8</td></tr><tr><td class="label">Sum</td><td class="sums">-39</td><td class="sums">39</td><td class="sums">-18</td><td class="sums">18</td><td class="sums">-6</td><td class="sums">6</td><td class="sums">-3</td><td class="sums" style="background: orange;">3</td></tr></table></div><p>Since 3 is the coefficient of the middle term, x<sup>2</sup> + 3x - 40 = (x - 5)(x + 8)</p></html>
}}}

{{{
visual_factor_BCform(34,-287)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + 34x - 287</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is -287 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is -287</td><td class="prods">1,-287</td><td class="prods">-1,287</td><td class="prods">7,-41</td><td class="prods" style="background: orange;">-7,41</td></tr><tr><td class="label">Sum</td><td class="sums">-286</td><td class="sums">286</td><td class="sums">-34</td><td class="sums" style="background: orange;">34</td></tr></table></div><p>Since 34 is the coefficient of the middle term, x<sup>2</sup> + 34x - 287 = (x - 7)(x + 41)</p></html>
}}}

{{{
visual_factor_BCform(-4,4)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> - 4x + 4</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is 4 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is 4</td><td class="prods">1,4</td><td class="prods">-1,-4</td><td class="prods">2,2</td><td class="prods" style="background: orange;">-2,-2</td></tr><tr><td class="label">Sum</td><td class="sums">5</td><td class="sums">-5</td><td class="sums">4</td><td class="sums" style="background: orange;">-4</td></tr></table></div><p>Since -4 is the coefficient of the middle term, x<sup>2</sup> - 4x + 4 = (x - 2)<sup>2</sup></p></html>
}}}

{{{
visual_factor_BCform(4,4)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + 4x + 4</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is 4 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is 4</td><td class="prods">1,4</td><td class="prods">-1,-4</td><td class="prods" style="background: orange;">2,2</td><td class="prods">-2,-2</td></tr><tr><td class="label">Sum</td><td class="sums">5</td><td class="sums">-5</td><td class="sums" style="background: orange;">4</td><td class="sums">-4</td></tr></table></div><p>Since 4 is the coefficient of the middle term, x<sup>2</sup> + 4x + 4 = (x + 2)<sup>2</sup></p></html>
}}}

{{{
visual_factor_BCform(-2,1)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> - 2x + 1</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is 1 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is 1</td><td class="prods">1,1</td><td class="prods" style="background: orange;">-1,-1</td></tr><tr><td class="label">Sum</td><td class="sums">2</td><td class="sums" style="background: orange;">-2</td></tr></table></div><p>Since -2 is the coefficient of the middle term, x<sup>2</sup> - 2x + 1 = (x - 1)<sup>2</sup></p></html>
}}}

{{{
visual_factor_BCform(-10,25)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> - 10x + 25</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is 25 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is 25</td><td class="prods">1,25</td><td class="prods">-1,-25</td><td class="prods">5,5</td><td class="prods" style="background: orange;">-5,-5</td></tr><tr><td class="label">Sum</td><td class="sums">26</td><td class="sums">-26</td><td class="sums">10</td><td class="sums" style="background: orange;">-10</td></tr></table></div><p>Since -10 is the coefficient of the middle term, x<sup>2</sup> - 10x + 25 = (x - 5)<sup>2</sup></p></html>
}}}

{{{

}}}

{{{
visual_factor_BCform(10,25)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + 10x + 25</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is 25 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is 25</td><td class="prods">1,25</td><td class="prods">-1,-25</td><td class="prods" style="background: orange;">5,5</td><td class="prods">-5,-5</td></tr><tr><td class="label">Sum</td><td class="sums">26</td><td class="sums">-26</td><td class="sums" style="background: orange;">10</td><td class="sums">-10</td></tr></table></div><p>Since 10 is the coefficient of the middle term, x<sup>2</sup> + 10x + 25 = (x + 5)<sup>2</sup></p></html>
}}}

{{{
visual_factor_BCform(2,1)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + 2x + 1</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is 1 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is 1</td><td class="prods" style="background: orange;">1,1</td><td class="prods">-1,-1</td></tr><tr><td class="label">Sum</td><td class="sums" style="background: orange;">2</td><td class="sums">-2</td></tr></table></div><p>Since 2 is the coefficient of the middle term, x<sup>2</sup> + 2x + 1 = (x + 1)<sup>2</sup></p></html>
}}}

{{{
visual_factor_BCform(5,6)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + 5x + 6</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is 6 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is 6</td><td class="prods">1,6</td><td class="prods">-1,-6</td><td class="prods" style="background: orange;">2,3</td><td class="prods">-2,-3</td></tr><tr><td class="label">Sum</td><td class="sums">7</td><td class="sums">-7</td><td class="sums" style="background: orange;">5</td><td class="sums">-5</td></tr></table></div><p>Since 5 is the coefficient of the middle term, x<sup>2</sup> + 5x + 6 = (x + 2)(x + 3)</p></html>
}}}

{{{
visual_factor_BCform(6,8)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + 6x + 8</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is 8 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is 8</td><td class="prods">1,8</td><td class="prods">-1,-8</td><td class="prods" style="background: orange;">2,4</td><td class="prods">-2,-4</td></tr><tr><td class="label">Sum</td><td class="sums">9</td><td class="sums">-9</td><td class="sums" style="background: orange;">6</td><td class="sums">-6</td></tr></table></div><p>Since 6 is the coefficient of the middle term, x<sup>2</sup> + 6x + 8 = (x + 2)(x + 4)</p></html>
}}}

{{{
visual_factor_BCform(10,16)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + 10x + 16</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is 16 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is 16</td><td class="prods">1,16</td><td class="prods">-1,-16</td><td class="prods" style="background: orange;">2,8</td><td class="prods">-2,-8</td><td class="prods">4,4</td><td class="prods">-4,-4</td></tr><tr><td class="label">Sum</td><td class="sums">17</td><td class="sums">-17</td><td class="sums" style="background: orange;">10</td><td class="sums">-10</td><td class="sums">8</td><td class="sums">-8</td></tr></table></div><p>Since 10 is the coefficient of the middle term, x<sup>2</sup> + 10x + 16 = (x + 2)(x + 8)</p></html>
}}}

{{{
visual_factor_BCform(7,6)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + 7x + 6</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is 6 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is 6</td><td class="prods" style="background: orange;">1,6</td><td class="prods">-1,-6</td><td class="prods">2,3</td><td class="prods">-2,-3</td></tr><tr><td class="label">Sum</td><td class="sums" style="background: orange;">7</td><td class="sums">-7</td><td class="sums">5</td><td class="sums">-5</td></tr></table></div><p>Since 7 is the coefficient of the middle term, x<sup>2</sup> + 7x + 6 = (x + 1)(x + 6)</p></html>
}}}

{{{
visual_factor_BCform(9,8)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + 9x + 8</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is 8 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is 8</td><td class="prods" style="background: orange;">1,8</td><td class="prods">-1,-8</td><td class="prods">2,4</td><td class="prods">-2,-4</td></tr><tr><td class="label">Sum</td><td class="sums" style="background: orange;">9</td><td class="sums">-9</td><td class="sums">6</td><td class="sums">-6</td></tr></table></div><p>Since 9 is the coefficient of the middle term, x<sup>2</sup> + 9x + 8 = (x + 1)(x + 8)</p></html>
}}}

{{{
visual_factor_BCform(7,10)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + 7x + 10</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is 10 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is 10</td><td class="prods">1,10</td><td class="prods">-1,-10</td><td class="prods" style="background: orange;">2,5</td><td class="prods">-2,-5</td></tr><tr><td class="label">Sum</td><td class="sums">11</td><td class="sums">-11</td><td class="sums" style="background: orange;">7</td><td class="sums">-7</td></tr></table></div><p>Since 7 is the coefficient of the middle term, x<sup>2</sup> + 7x + 10 = (x + 2)(x + 5)</p></html>
}}}

{{{
visual_factor_BCform(11,10)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + 11x + 10</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is 10 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is 10</td><td class="prods" style="background: orange;">1,10</td><td class="prods">-1,-10</td><td class="prods">2,5</td><td class="prods">-2,-5</td></tr><tr><td class="label">Sum</td><td class="sums" style="background: orange;">11</td><td class="sums">-11</td><td class="sums">7</td><td class="sums">-7</td></tr></table></div><p>Since 11 is the coefficient of the middle term, x<sup>2</sup> + 11x + 10 = (x + 1)(x + 10)</p></html>
}}}

{{{
visual_factor_BCform(-10,16)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> - 10x + 16</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is 16 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is 16</td><td class="prods">1,16</td><td class="prods">-1,-16</td><td class="prods">2,8</td><td class="prods" style="background: orange;">-2,-8</td><td class="prods">4,4</td><td class="prods">-4,-4</td></tr><tr><td class="label">Sum</td><td class="sums">17</td><td class="sums">-17</td><td class="sums">10</td><td class="sums" style="background: orange;">-10</td><td class="sums">8</td><td class="sums">-8</td></tr></table></div><p>Since -10 is the coefficient of the middle term, x<sup>2</sup> - 10x + 16 = (x - 2)(x - 8)</p></html>
}}}

{{{
visual_factor_BCform(2,8)
///
This quadratic is un-factorable.
}}}

{{{
visual_factor_BCform(-17,16)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> - 17x + 16</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is 16 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is 16</td><td class="prods">1,16</td><td class="prods" style="background: orange;">-1,-16</td><td class="prods">2,8</td><td class="prods">-2,-8</td><td class="prods">4,4</td><td class="prods">-4,-4</td></tr><tr><td class="label">Sum</td><td class="sums">17</td><td class="sums" style="background: orange;">-17</td><td class="sums">10</td><td class="sums">-10</td><td class="sums">8</td><td class="sums">-8</td></tr></table></div><p>Since -17 is the coefficient of the middle term, x<sup>2</sup> - 17x + 16 = (x - 1)(x - 16)</p></html>
}}}

{{{
visual_factor_BCform(-7,-8)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> - 7x - 8</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is -8 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is -8</td><td class="prods" style="background: orange;">1,-8</td><td class="prods">-1,8</td><td class="prods">2,-4</td><td class="prods">-2,4</td></tr><tr><td class="label">Sum</td><td class="sums" style="background: orange;">-7</td><td class="sums">7</td><td class="sums">-2</td><td class="sums">2</td></tr></table></div><p>Since -7 is the coefficient of the middle term, x<sup>2</sup> - 7x - 8 = (x + 1)(x - 8)</p></html>
}}}

{{{
visual_factor_BCform(-2,-8)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> - 2x - 8</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is -8 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is -8</td><td class="prods">1,-8</td><td class="prods">-1,8</td><td class="prods" style="background: orange;">2,-4</td><td class="prods">-2,4</td></tr><tr><td class="label">Sum</td><td class="sums">-7</td><td class="sums">7</td><td class="sums" style="background: orange;">-2</td><td class="sums">2</td></tr></table></div><p>Since -2 is the coefficient of the middle term, x<sup>2</sup> - 2x - 8 = (x + 2)(x - 4)</p></html>
}}}

{{{
visual_factor_BCform(7,-8)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + 7x - 8</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is -8 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is -8</td><td class="prods">1,-8</td><td class="prods" style="background: orange;">-1,8</td><td class="prods">2,-4</td><td class="prods">-2,4</td></tr><tr><td class="label">Sum</td><td class="sums">-7</td><td class="sums" style="background: orange;">7</td><td class="sums">-2</td><td class="sums">2</td></tr></table></div><p>Since 7 is the coefficient of the middle term, x<sup>2</sup> + 7x - 8 = (x - 1)(x + 8)</p></html>
}}}

{{{
visual_factor_BCform(2,-8)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + 2x - 8</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is -8 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is -8</td><td class="prods">1,-8</td><td class="prods">-1,8</td><td class="prods">2,-4</td><td class="prods" style="background: orange;">-2,4</td></tr><tr><td class="label">Sum</td><td class="sums">-7</td><td class="sums">7</td><td class="sums">-2</td><td class="sums" style="background: orange;">2</td></tr></table></div><p>Since 2 is the coefficient of the middle term, x<sup>2</sup> + 2x - 8 = (x - 2)(x + 4)</p></html>
}}}

{{{
visual_factor_BCform(-16,-80)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> - 16x - 80</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is -80 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is -80</td><td class="prods">1,-80</td><td class="prods">-1,80</td><td class="prods">2,-40</td><td class="prods">-2,40</td><td class="prods" style="background: orange;">4,-20</td><td class="prods">-4,20</td><td class="prods">5,-16</td><td class="prods">-5,16</td><td class="prods">8,-10</td><td class="prods">-8,10</td></tr><tr><td class="label">Sum</td><td class="sums">-79</td><td class="sums">79</td><td class="sums">-38</td><td class="sums">38</td><td class="sums" style="background: orange;">-16</td><td class="sums">16</td><td class="sums">-11</td><td class="sums">11</td><td class="sums">-2</td><td class="sums">2</td></tr></table></div><p>Since -16 is the coefficient of the middle term, x<sup>2</sup> - 16x - 80 = (x + 4)(x - 20)</p></html>
}}}

{{{
visual_factor_BCform(4,-32)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + 4x - 32</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is -32 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is -32</td><td class="prods">1,-32</td><td class="prods">-1,32</td><td class="prods">2,-16</td><td class="prods">-2,16</td><td class="prods">4,-8</td><td class="prods" style="background: orange;">-4,8</td></tr><tr><td class="label">Sum</td><td class="sums">-31</td><td class="sums">31</td><td class="sums">-14</td><td class="sums">14</td><td class="sums">-4</td><td class="sums" style="background: orange;">4</td></tr></table></div><p>Since 4 is the coefficient of the middle term, x<sup>2</sup> + 4x - 32 = (x - 4)(x + 8)</p></html>
}}}

{{{
visual_factor_BCform(9,18)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + 9x + 18</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is 18 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is 18</td><td class="prods">1,18</td><td class="prods">-1,-18</td><td class="prods">2,9</td><td class="prods">-2,-9</td><td class="prods" style="background: orange;">3,6</td><td class="prods">-3,-6</td></tr><tr><td class="label">Sum</td><td class="sums">19</td><td class="sums">-19</td><td class="sums">11</td><td class="sums">-11</td><td class="sums" style="background: orange;">9</td><td class="sums">-9</td></tr></table></div><p>Since 9 is the coefficient of the middle term, x<sup>2</sup> + 9x + 18 = (x + 3)(x + 6)</p></html>
}}}

{{{
visual_factor_BCform(17,60)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + 17x + 60</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is 60 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is 60</td><td class="prods">1,60</td><td class="prods">-1,-60</td><td class="prods">2,30</td><td class="prods">-2,-30</td><td class="prods">3,20</td><td class="prods">-3,-20</td><td class="prods">4,15</td><td class="prods">-4,-15</td><td class="prods" style="background: orange;">5,12</td><td class="prods">-5,-12</td><td class="prods">6,10</td><td class="prods">-6,-10</td></tr><tr><td class="label">Sum</td><td class="sums">61</td><td class="sums">-61</td><td class="sums">32</td><td class="sums">-32</td><td class="sums">23</td><td class="sums">-23</td><td class="sums">19</td><td class="sums">-19</td><td class="sums" style="background: orange;">17</td><td class="sums">-17</td><td class="sums">16</td><td class="sums">-16</td></tr></table></div><p>Since 17 is the coefficient of the middle term, x<sup>2</sup> + 17x + 60 = (x + 5)(x + 12)</p></html>
}}}

{{{
visual_factor_BCform(20,36)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + 20x + 36</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is 36 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is 36</td><td class="prods">1,36</td><td class="prods">-1,-36</td><td class="prods" style="background: orange;">2,18</td><td class="prods">-2,-18</td><td class="prods">3,12</td><td class="prods">-3,-12</td><td class="prods">4,9</td><td class="prods">-4,-9</td><td class="prods">6,6</td><td class="prods">-6,-6</td></tr><tr><td class="label">Sum</td><td class="sums">37</td><td class="sums">-37</td><td class="sums" style="background: orange;">20</td><td class="sums">-20</td><td class="sums">15</td><td class="sums">-15</td><td class="sums">13</td><td class="sums">-13</td><td class="sums">12</td><td class="sums">-12</td></tr></table></div><p>Since 20 is the coefficient of the middle term, x<sup>2</sup> + 20x + 36 = (x + 2)(x + 18)</p></html>
}}}

{{{
visual_factor_BCform(10,-3*13)
///
<html>
<style>
p {
        color: #000;
}
.pst table {
        cellspacing: 0;
        borderspacing: 0;
	table-layout: fixed;
	border-collapse: collapse;
	caption-side:top;
	margin-top:0;
        font: 16px sans-serif;
        border: 2px solid #000;
        padding: 0;
        color: #000;
}
.pst td {
	border-left: 2px solid #000;
	vertical-align: middle;
        height: 40px;
}
td .label1 {
        background: yellow;
        width: 250px;
        border-bottom: 2px solid #ccc;
        text-align: left;
}
td .label {
        background: yellow;
        width: 250px;
        text-align: left;
}
td .prods {
        background: #69C;
        border-bottom: 2px solid #ccc;
        width: 40px;
	text-align: center;
}
td .sums {
        background: #69C;
        width: 40px;
	text-align: center;
}
</style>
<p>Factor completely: x<sup>2</sup> + 10x - 39</p><h3 style="color: green;">Solution</h3><p>First, determine all integer pairs whose product is -39 and then compute each sum.</p><div class="pst"><table><tr><td class="label1">Integer pairs whose product is -39</td><td class="prods">1,-39</td><td class="prods">-1,39</td><td class="prods">3,-13</td><td class="prods" style="background: orange;">-3,13</td></tr><tr><td class="label">Sum</td><td class="sums">-38</td><td class="sums">38</td><td class="sums">-10</td><td class="sums" style="background: orange;">10</td></tr></table></div><p>Since 10 is the coefficient of the middle term, x<sup>2</sup> + 10x - 39 = (x - 3)(x + 13)</p></html>
}}}

{{{

}}}