Minimum of a quadratic expression
Find the least value of \(x^2-8x+y^2+2y+20\).
Complete the square in \(x\) and in \(y\).
We have \(x^2-8x=(x-4)^2-16\) and \(y^2+2y=(y+1)^2-1\). Hence the expression equals \((x-4)^2+(y+1)^2+3\).
A sum of squares is nonnegative, so the minimum is \(3\), attained at \(x=4\), \(y=-1\).