Given that \(x^{2} + 4x + k = (x + r)^{2} + 1\), find the value of k and r.
Answer Details
We know that the left side of the equation can be expanded to give:
$$x^{2} + 4x + k = x^{2} + 2xr + r^{2} + 1$$
By comparing the coefficients of x and x^2, we get:
$$2xr + 4x = 0 \implies x(2r+4) = 0$$
Since x cannot be equal to zero, we have:
$$2r + 4 = 0 \implies r = -2$$
Substituting r = -2 in the original equation, we get:
$$x^{2} + 4x + k = (x-2)^{2} + 1 = x^{2} - 4x + 5$$
Comparing the coefficients of x^2 and x, we get:
$$k = 5$$
Therefore, the solution is k = 5, r = -2.
Note that this matches with.