Question:
Find the minimum value of
\[2x^2 + 2xy + y^2 - 2x + 2y + 4\]over all real numbers $x$ and $y.$

Answer:
We can write
\begin{align*}
2x^2 + 2xy + y^2 - 2x + 2y + 4 &= (x^2 + y^2 + 1 + 2x + 2y + 2xy) + (x^2 - 4x + 4) - 1 \\
&= (x + y + 1)^2 + (x - 2)^2 - 1.
\end{align*}Thus, the minimum value is $\boxed{-1},$ which occurs when $x + y + 1 = 0$ and $x - 2 = 0,$ or $x = 2$ and $y = -3.$