a) \(3x^2-9x+30=3\left(x^2-3x+10\right)\)
b) \(3x^2-5x-2=3x^2-6x+x-2\)
\(=3x\left(x-2\right)+\left(x-2\right)=\left(3x+1\right)\left(x-2\right)\)
c) \(x^4+4y^4\)
\(=x^4+4y^4+2x^2y^2+2x^2y^2-4x^2y^2+4xy^3-4xy^3+2x^3y-2x^3y\)
\(=\left(4y^4-4xy^3+2x^2y^2\right)+\left(4xy^3-4x^2y^2+2x^3y\right)\)
\(+\left(2x^2y^2-2x^3y+x^4\right)\)
\(=2y^2\left(2y^2-2xy+x^2\right)+2xy\left(2y^2-2xy+x^2\right)\)
\(+x^2\left(2y^2-2xy+x^2\right)\)
\(=\left(2y^2+2xy+x^2\right)\left(2y^2-2xy+x^2\right)\)
d) \(x^5+x+1\)
\(=x^5+x+1+x^4-x^4+x^3-x^3+x^2-x^2\)
\(=\left(x^5-x^4+x^2\right)+\left(x^4-x^3+x\right)+\left(x^3-x^2+1\right)\)
\(=x^2\left(x^3-x^2+1\right)+x\left(x^3-x^2+1\right)+\left(x^3-x^2+1\right)\)
\(=\left(x^2+x+1\right)\left(x^3-x^2+1\right)\)