To complete the square and rewrite the quadratic function in vertex form, we need to follow these steps:
Step 1: Group the x terms and the constant term separately:
y = x^2 + 4x + 4
y = (x^2 + 4x) + 4
Step 2: Complete the square by adding and subtracting the square of half the coefficient of x from the x terms:
y = (x^2 + 4x + (4/2)^2) - (4/2)^2 + 4
Step 3: Simplify the expression inside the parentheses:
y = (x + 2)^2 - 4 + 4
Step 4: Combine the constant terms:
y = (x + 2)^2
Therefore, the quadratic function in vertex form is: y = (x + 2)^2.