Lời giải:
a) $x^3+3x^2y+x+3xy^2+y+y^3$
$=(x^3+3x^2y+3xy^2+y^3)+(x+y)$
$=(x+y)^3+(x+y)=(x+y)[(x+y)^2+1]$
b) $x^3+y(1-3x^2)+x(3y^2-1)-y^3$
$=(x^3-3x^2y+3xy^2-y^3)-(x-y)$
$=(x-y)^3-(x-y)=(x-y)[(x-y)^2-1]=(x-y)(x-y-1)(x-y+1)$
c)
$27x^3+27x^2+9x+1=(3x+1)^3$
d)
$x(x+1)^2+x(x-5)-5(x+1)^2$
$=x(x+1)^2-5(x+1)^2+x(x-5)$
$=(x-5)(x+1)^2+x(x-5)=(x-5)[(x+1)^2+x]$
$=(x-5)(x^2+3x+2)=(x-5)(x+1)(x+2)$