\(x^3+2x^2+x-4xy^2\)
\(=x\left(x^2+2x+1\right)-4xy^2\)
\(=x\left(x+1\right)^2-4xy^2\)
\(=x\left(\left(x+1\right)^2-4y^2\right)\)
\(=x\left(\left(x+1-2y\right)\left(x+1+2y\right)\right)\)
\(\text{x3+2x2+x−4xy2 =x(x2+2x+1)−4xy2 =x(x+1)2−4xy2 =x((x+1)2−4y2) =x((x+1−2y)(x+1+2y))}\)
b)
x3-3x2+7x2-21x+9x-27
=x2(x-3)+7x(x-3)+9(x-3)
=(x-3)(x2+7x+9)