# Factorising Quadratics with Six Terms of $x$ and $y$ such as $x^2 + 2xy + 5x + 5y + y^2 + 6$

Sometimes students may encounter complex quadratics factorise involving $x^2, y^2, xy, x$ and $y$. Consider factorising by only either $x$ or $y$. The following examples take through factorising $y$ first, then $x$.

## Example 1

Factorise $x^2 + 2xy + 5x + y^2+ 5y + 6$.

\require{AMSsymbols} \begin{align} &= x^2 + 2xy + 5x + (y^2 + 5y+6) \\ &= x^2+\bbox[aqua,3px]{2xy + 5x}+(y+2)(y+3) \end{align}

$\require{AMSsymbols} \begin{array} {ccr} &\bbox[yellow,5px]{x} &\bbox[pink]{(y+2)} &\bbox[pink]{x(y+2)=xy+2x} \\ &\bbox[pink,5px]{x} &\bbox[yellow]{(y+3)} &\bbox[yellow]{x(y+3)=xy+3x} \\ \hline &&&\bbox[aqua,3px]{2xy+5x} \end{array}$

\require{AMSsymbols} \begin{align} &= (\bbox[yellow,5px]x+\bbox[pink]{(y+2)})(\bbox[pink,5px]x+\bbox[yellow]{(y+3)}) \\ &= (x+y+2)(x+y+3) \end{align}

## Example 2

Factorise $x^2-3xy-3x+2y^2+4y+2$.

\require{AMSsymbols} \begin{align} &= x^2-3xy-3x+2(y^2+2y+1) \\ &= x^2\bbox[aqua,3px]{-3xy-3x}+2(y+1)(y+1) \end{align}

$\require{AMSsymbols} \begin{array} {ccr} &\bbox[yellow,5px]{x} &\bbox[pink]{-(y+1)} &\bbox[pink]{-x(y+1)=-xy-x} \\ &\bbox[pink,5px]{x} &\bbox[yellow]{-2(y+1)} &\bbox[yellow]{-2x(y+1)=-2xy-2x} \\ \hline &&&\bbox[aqua,3px]{-3xy-3x} \end{array}$

\require{AMSsymbols} \begin{align} &= (\bbox[yellow,5px]x\bbox[pink]{-(y+1)})(\bbox[pink,5px]x\bbox[yellow]{-2(y+1)}) \\ &= (x-y-1)(x-2y-2) \end{align}

## Example 3

Factorise $x^2+3xy+5x+2y^2+7y+6$.

\require{AMSsymbols} \begin{align} &= x^2+3xy+5x+(2y^2+7y+6) \\ &= x^2+\bbox[aqua,3px]{3xy+5x}+(2y+3)(y+2) \end{align}

$\require{AMSsymbols} \begin{array} {ccr} &\bbox[yellow,5px]{x} &\bbox[pink]{(2y+3)} &\bbox[pink]{x(2y+3)=2xy+3x} \\ &\bbox[pink,5px]{x} &\bbox[yellow]{(y+2)} &\bbox[yellow]{x(y+2)=xy+2x} \\ \hline &&&\bbox[aqua,3px]{3xy+5x} \end{array}$

\require{AMSsymbols} \begin{align} &= (\bbox[yellow,5px]x+\bbox[pink]{(2y+3)})(\bbox[pink,5px]x+\bbox[yellow]{(y+2)}) \\ &= (x+2y+3)(x+y+2) \end{align}

## Example 4

Factorise $x^2-2xy+x-3y^2+5y-2$.

\require{AMSsymbols} \begin{align} &= x^2-2xy+x-(3y^2-5y+2) \\ &= x^2\bbox[aqua,3px]{-2xy+x}-(3y-2)(y-1) \end{align}

$\require{AMSsymbols} \begin{array} {ccr} &\bbox[yellow,5px]{x} &\bbox[pink]{-(3y-2)} &\bbox[pink]{-x(3y-2)=-3xy+2x} \\ &\bbox[pink,5px]{x} &\bbox[yellow]{(y-1)} &\bbox[yellow]{x(y-1)=xy-x} \\ \hline &&&\bbox[aqua,3px]{-2xy+x} \end{array}$

\require{AMSsymbols} \begin{align} &= (\bbox[yellow,5px]x\bbox[pink]{-(3y-2)})(\bbox[pink,5px]x+\bbox[yellow]{(y-1)}) \\ &= (x-3y+2)(x+y-1) \end{align}

## Example 5

Factorise $2x^2-7xy+11x+3y^2-13y+12$.

\require{AMSsymbols} \begin{align} &= x^2-7xy+11x+(3y^2-13y+12) \\ &= 2x^2\bbox[aqua,3px]{-7xy+11x}+(3y-4)(y-3) \end{align}

$\require{AMSsymbols} \begin{array} {rcr} &\bbox[yellow,5px]{x} &\bbox[pink]{-(3y-4)} &\bbox[pink]{-2x(3y-4)=-6xy+8x} \\ &\bbox[pink,5px]{2x} &\bbox[yellow]{-(y-3)} &\bbox[yellow]{-x(y-3)=-xy+3x} \\ \hline &&&\bbox[aqua,3px]{-7xy+11x} \end{array}$

\require{AMSsymbols} \begin{align} &= (\bbox[yellow,5px]x\bbox[pink]{-(3y-4)})(\bbox[pink,5px]{2x}\bbox[yellow]{-(y-3)}) \\ &= (x-3y+4)(2x-y+3) \end{align}

## Example 6

Factorise $12x^2+20xy-24x-8y^2+22y-15$.

\require{AMSsymbols} \begin{align} &= 12x^2+20xy-24x-(8y^2-22y+15) \\ &= 12x^2+\bbox[aqua,3px]{20xy-24x}-(4y-5)(2y-3) \end{align}

$\require{AMSsymbols} \begin{array} {rcr} &\bbox[yellow,5px]{2x} &\bbox[pink]{(4y-5)} &\bbox[pink]{6x(4y-5)=24xy-30x} \\ &\bbox[pink,5px]{6x} &\bbox[yellow]{-(2y-3)} &\bbox[yellow]{-2x(2y-3)=-4xy+6x} \\ \hline &&&\bbox[aqua,3px]{20xy-24x} \end{array}$

\require{AMSsymbols} \begin{align} &= (\bbox[yellow,5px]{2x}+\bbox[pink]{(4y-5)})(\bbox[pink,5px]{6x}\bbox[yellow]{-(2y-3)}) \\ &= (2x+4y-5)(6x-2y+3) \end{align}