factor the following polynomials

1. x⁴+6x³-x²+6x
2. 2x⁴+7x³-4x²-27x-18
3. 12x³-31x²+20x
4. x⁴-x³+x²-x​