How do you factor #27-8x^3+y^3+18xy# ?

1 Answer
Oct 7, 2017

#27-8x^3+y^3+18xy#

#=(y^2+4x^2+2xy-3y+6x+9)(3+y-2x)#

Explanation:

Given:

#27-8x^3+y^3+18xy#

Setting #x=0#, this becomes:

#27+y^3 = (3+y)(9-3y+y^2)#

Setting #y=0#, it becomes:

#27-8x^3 = (3-2x)(9+6x+4x^2)#

So try mushing #(3+y)# and #(3-2x)# together to get #(3+y-2x)# and divide by that:

#27-8x^3+y^3+18xy#

#=(3y^2+y^3-2xy^2)+(12x^2+4x^2y-8x^3)+(6xy+2xy^2-4x^2y)+(-9y-3y^2+6xy)+(18x+6xy-12x^2)+(27+9y-18x)#

#=(y^2+4x^2+2xy-3y+6x+9)(3+y-2x)#

As a check, note that if we set #x=0# or #y=0# in:

#(y^2+4x^2+2xy-3y+6x+9)#

then we get:

#(9-3y+y^2)" "# or #" "(9+6x+4x^2)#

The only term we would not get from "mushing" these two together is the #2xy# term.