a) \(x^2+4x+4\)
\(=x^2+2\cdot2\cdot x+2^2\)
\(=\left(x+2\right)^2\)
b) \(4x^2-4x+1\)
\(=\left(2x\right)^2-2\cdot2x\cdot1+1^2\)
\(=\left(2x-1\right)^2\)
c) \(x^2-x+\dfrac{1}{4}\)
\(=x^2-2\cdot\dfrac{1}{2}\cdot x+\left(\dfrac{1}{2}\right)^2\)
\(=\left(x-\dfrac{1}{2}\right)^2\)
d) \(4\left(x+y\right)^2-4\left(x+y\right)+1\)
\(=\left[2\left(x+y\right)\right]^2-2\cdot2\left(x+y\right)\cdot1+1^2\)
\(=\left[2\left(x+y\right)-1\right]^2\)
\(=\left(2x+2y-1\right)^2\)