# How do you apply this algorithm to $x^2+5x+6$?

There's a generic algorithm that works for these types of trinomials ($ax^2+bx+c$)

1. First write $\left(\dfrac{ax\phantom{+4}}{\phantom{5}}\right) \left(\dfrac{ax\phantom{+4}}{\phantom{5}}\right).$
2. Find the product $ac$, including sign.
3. Find the prime factorization of $ac$ using the factor tree.
4. Find all factor pairs of $ac$ using the factor tree: begin with $1$,$ac$, and increase the $1$ according to whether you can get it by a product of numbers in the prime factorization of $ac$. You are done when the first number has reached \sqrt{ac}.
5. Find the factor pair of $ac$ such that the two numbers add to $b$, including sign. If $ac>0$, then the two numbers will have the same sign. If $ac<0$, then the two numbers will have opposite signs. (If this step fails, the quadratic does not factor.) Call these two numbers $s$ and $t$.
6. Write $\left(\dfrac{ax+s}{\phantom{5}}\right)\left(\dfrac{ax+t}{\phantom{5}}\right).$
7. Divide each of these binomials by its own GCF $\left(\dfrac{ax+s}{\operatorname{gcf}(a,s)}\right) \left(\dfrac{ax+t}{\operatorname{gcf}(a,t)}\right).$ Check that $$\operatorname{gcf}(a,s)\cdot\operatorname{gcf}(a,t)=a.$$

How do you apply this algorithm to $x^2+5x+6$?

Regards!

• In which step are you stuck? – mfl Aug 2 '18 at 9:20
• What are $a,b,c$ - in your case? – Kolja Aug 2 '18 at 9:20
• This looks like a slightly convoluted way of saying "use the rational roots theorem on the quadratic, and write down the resulting factorization if you find a root". – Henning Makholm Aug 2 '18 at 9:43

1. First write $\left(\dfrac{ax\phantom{+4}}{\phantom{5}}\right) \left(\dfrac{ax\phantom{+4}}{\phantom{5}}\right).$

$$\left(\dfrac{x\phantom{+4}}{\phantom{5}}\right) \left(\dfrac{x\phantom{+4}}{\phantom{5}}\right)$$

1. Find the product $ac$, including sign.

$$ac=6$$

1. Find the prime factorization of $ac$ using the factor tree.

$$ac=6=2\cdot 3$$

1. Find all factor pairs of $ac$ using the factor tree: begin with $1$,$ac$, and increase the $1$ according to whether you can get it by a product of numbers in the prime factorization of $ac$. You are done when the first number has reached \sqrt{ac}.

$$(1,6),(2,3),(-1,-6),(-2,-3)$$

1. Find the factor pair of $ac$ such that the two numbers add to $b$, including sign. If $ac>0$, then the two numbers will have the same sign. If $ac<0$, then the two numbers will have opposite signs. (If this step fails, the quadratic does not factor.) Call these two numbers $s$ and $t$.

$$(s,t)=(2,3)$$

1. Write $\left(\dfrac{ax+s}{\phantom{5}}\right)\left(\dfrac{ax+t}{\phantom{5}}\right).$

$$\left(\dfrac{x+2}{\phantom{5}}\right)\left(\dfrac{x+3}{\phantom{5}}\right)$$

1. Divide each of these binomials by its own GCF $\left(\dfrac{ax+s}{\operatorname{gcf}(a,s)}\right) \left(\dfrac{ax+t}{\operatorname{gcf}(a,t)}\right).$ Check that $$\operatorname{gcf}(a,s)\cdot\operatorname{gcf}(a,t)=a.$$

$$\left(\dfrac{x+2}{1}\right)\left(\dfrac{x+3}{1}\right)=\left(x+2\right)\left(x+3\right)$$

In that case, as an alternative, we can proceed by completing the square as follow

$$x^2+5x+6=x^2+5x+\frac{25}{4}-\frac{25}{4}+6=\left(x+\frac{5}{2}\right)^2-\frac{1}{4}=$$ $$=\left[\left(x+\frac{5}{2}\right)-\frac{1}{2}\right]\left[\left(x+\frac{5}{2}\right)+\frac{1}{2}\right]=\left(x+2\right)\left(x+3\right)$$

• Can you be more clear at this step $(1,6),(2,3),(-1,-6),(-2,-3)$? – Mark Aug 2 '18 at 10:12
• @C.Maxwell Those are all the possible integer pairs for the factorization of $6$. – gimusi Aug 2 '18 at 10:14
• I still didn't get it properly. $(s,t)=(2,3)$ and $(1,6),(2,3),(-1,-6),(-2,-3)$ seemed to be confusing. – Mark Aug 2 '18 at 10:16
• @C.Maxwell I've followed the algorithm,where does it come from? – gimusi Aug 2 '18 at 10:18
• @C.Maxwell In point 4 we find all possible pairs such that $st=ac=6$ then in point 5 we select the pair such that $s+t=5$ that is $(2,3)$. – gimusi Aug 2 '18 at 10:20