1) \(\left(a+b\right)^2-\left(a^3+b^3\right)\)
\(=\left(a+b\right)^3-\left(a+b\right)\left(a^2-ab+b^2\right)\)
\(=\left(a+b\right)\left(a^2+2ab+b^2-a^2+ab-b^2\right)\)
\(=3ab\left(a+b\right)\)
2) \(\left(x+1\right)^2-4\left(x+1\right)y^2+4y^4\)
\(=\left(x+1+2y^2\right)^2\)