###### Example7.3.12

Factor $$x^2+5xy+6y^2\text{.}$$ This is a trinomial, and the coefficient of $$x$$ is $$1\text{,}$$ so maybe we can factor it. We want to write $$(x+\mathord{?})(x+\mathord{?})$$ where the question marks will be something that makes it all multiply out to $$x^2+5xy+6y^2\text{.}$$

Since the last term in the polynomial has a factor of $$y^2\text{,}$$ it is natural to wonder if there is a factor of $$y$$ in each of the two question marks. If there were, these two factors of $$y$$ would multiply to $$y^2\text{.}$$ So it is natural to wonder if we are looking for $$(x+\mathord{?}y)(x+\mathord{?}y)$$ where now the question marks are just numbers.

At this point we can think like we have throughout this section. Are there some numbers that multiply to $$6$$ and add to $$5\text{?}$$ Yes, specifically $$2$$ and $$3\text{.}$$ So we suspect that $$(x+2y)(x+3y)$$ might be the factorization.

To confirm that this is correct, we should check by multiplying out the factored form:

\begin{align*} (x+2y)(x+3y)\amp=(x+2y)\cdot x+(x+2y)\cdot3y\\ \amp=x^2+2xy+3xy+6y^2\\ \amp\stackrel{\checkmark}{=}x^2+5xy+6y^2 \end{align*}
 $$x$$ $$2y$$ $$x$$ $$x^2$$ $$2xy$$ $$3y$$ $$3xy$$ $$6y^2$$

Our factorization passes the tests.

in-context