What is the minimum value of z if $z=x^2+2y^2+16x-4y+22?$
z = x^2 + 16x + 2y^2 - 4y + 22
complete the square on x and y
z = x^2 + 16x + 64 + 2(y^2 - 2y + 1) + 22 - 64 - 2
z = ( x + 8)^2 + 2 ( y - 1)^2 - 44
The minimum value for z is when x = -8 and y = 1
And that value is z = -44