\(4x-x^3+2x^2y-xy^2\)
\(=x\left(4-x^2+2xy-y^2\right)\)
\(=x\left(4-\left(x^2-2xy+y^2\right)\right)\)
\(=x\left(2^2-\left(x-y\right)^2\right)\)
\(=x\left(2+x-y\right)\left(2-x+y\right)\)
\(4x-x^3+2x^2y-xy^2=x\left(4-x^2+2xy-y^2\right)\)
\(=x\left[4-\left(x^2-2xy+y^2\right)\right]=x\left[4-\left(x-y\right)^2\right]=x\left(2-x+y\right)\left(2+x-y\right)\)