Bài 1:
a) \(x\left(x+1\right)+x\left(x-1\right)-2x^2\)
\(=x^2+x+x^2-x-2x^2\)
\(=2x^2-2x^2\)
\(=0\)
b) \(\left(x+2\right)\left(x^2-x+1\right)-\left(x-2\right)\left(x^2+x+1\right)\)
\(=x^3-x^2+x+2x^2-2x+2-x^3-x^2-x+2x^2+2x+2\)
\(=\left(x^3-x^3\right)+\left(-x^2+2x^2-x^2+2x^2\right)+\left(x-2x-x+2x\right)+\left(2+2\right)\)
\(=2x^2+4\)
c) \(\left(3-x\right)^2+2\left(x-3\right)\left(x+7\right)+\left(x+7\right)^2\)
\(=\left(x-3\right)^2+2\left(x-3\right)\left(x+7\right)+\left(x+7\right)^2\)
\(=\left[\left(x-3\right)+\left(x+7\right)\right]^2\)
\(=\left(x-3+x+7\right)^2\)
\(=\left(2x+4\right)^2\)
Bài 2:
a) \(x^2-4-4\left(2-x\right)\)
\(=\left(x^2-4\right)+4\left(x-2\right)\)
\(=\left(x^2-2^2\right)+4\left(x-2\right)\)
\(=\left(x+2\right)\left(x-2\right)+4\left(x-2\right)\)
\(=\left(x-2\right)\left(x+2+4\right)\)
\(=\left(x-2\right)\left(x+6\right)\)
b) \(x^3+8\left(1-2x\right)^3\)
\(=x^3+\left[2\left(1-2x\right)\right]^3\)
\(=\left[x+2\left(1-2x\right)\right]\left[x^2-x\cdot2\left(1-2x\right)+2^2\left(1-2x\right)^2\right]\)
\(=\left(x+2-4x\right)\left[x^2-2x\left(1-2x\right)+4\left(1-4x+4x^2\right)\right]\)
\(=\left(2-3x\right)\left(x^2-2x+4x^2+4-16x+16x^2\right)\)
\(=\left(2-3x\right)\left(21x^2-18x+4\right)\)