a: \(x^3y+x-y-1\)
\(=\left(x^3y-y\right)+\left(x-1\right)\)
\(=y\left(x^3-1\right)+\left(x-1\right)\)
\(=y\left(x-1\right)\left(x^2+x+1\right)+\left(x-1\right)\)
\(=\left(x-1\right)\left(x^2y+xy+y+1\right)\)
b: \(x^2\left(x-2\right)+4\left(2-x\right)\)
\(=x^2\left(x-2\right)-4\left(x-2\right)\)
\(=\left(x-2\right)\left(x^2-4\right)\)
\(=\left(x-2\right)\cdot\left(x-2\right)\left(x+2\right)=\left(x+2\right)\cdot\left(x-2\right)^2\)
c: \(x^3-x^2-20x\)
\(=x\cdot x^2-x\cdot x-x\cdot20\)
\(=x\left(x^2-x-20\right)\)
\(=x\left(x^2-5x+4x-20\right)\)
\(=x\left[x\left(x-5\right)+4\left(x-5\right)\right]\)
\(=x\left(x-5\right)\left(x+4\right)\)
d: \(\left(x^2+1\right)^2-\left(x+1\right)^2\)
\(=\left(x^2+1+x+1\right)\left(x^2+1-x-1\right)\)
\(=\left(x^2+x+2\right)\left(x^2-x\right)\)
\(=x\left(x-1\right)\left(x^2+x+2\right)\)