Bài 4:
a) Ta có: \(x^3+6x^2+12x+8\)
\(=x^3+2x^2+4x^2+8x+4x+8\)
\(=x^2\left(x+2\right)+4x\left(x+2\right)+4\left(x+2\right)\)
\(=\left(x+2\right)\left(x^2+4x+4\right)\)
\(=\left(x+2\right)^3\)
b) Ta có: \(x^3-3x^2+3x-1\)
\(=x^3-x^2-2x^2+2x+x-1\)
\(=x^2\left(x-1\right)-2x\left(x-1\right)+\left(x-1\right)\)
\(=\left(x-1\right)\left(x^2-2x+1\right)\)
\(=\left(x-1\right)^3\)
c) Ta có: \(1-9x+27x^2-27x^3\)
\(=1-3x-6x+18x^2+9x^2-27x^3\)
\(=\left(1-3x\right)-6x\left(1-3x\right)+9x^2\left(1-3x\right)\)
\(=\left(1-3x\right)\left(1-6x+9x^2\right)\)
\(=\left(1-3x\right)^3\)
d) Ta có: \(x^3+\frac{3}{2}x^2+\frac{3}{4}x+\frac{1}{8}\)
\(=x^3+3\cdot x^2\cdot\frac{1}{2}+3\cdot x\cdot\left(\frac{1}{2}\right)^2+\left(\frac{1}{2}\right)^3\)
\(=\left(x+\frac{1}{2}\right)^3\)
e) Ta có: \(27x^3-54x^2y+36xy^2-8y^3\)
\(=\left(3x\right)^3-3\cdot\left(3x\right)^2\cdot2y+3\cdot3x\cdot\left(2y\right)^2-\left(2y\right)^3\)
\(=\left(3x-2y\right)^3\)