<s>[INST] Finding minimum value of $x^2+y^2+xy+x-4y+9$ 
What is the minimum value of $f(x,y)=x^2+y^2+xy+x-4y+9$ ?

I tried completing squares,
$$x^2+y^2+xy+x-4y+9=\frac12(x^2+2xy+y^2+x^2+2x+1+y^2-8y+16+1)=\frac12[(x+y)^2+(x+1)^2+(y-4)^2+1]$$But not sure how to continue.
 [/INST] Your work is already very useful. Since the function is continuous and bounded from below (your calculations show that the expression is greater or equal than $\frac 12$), it has a global minimum. Since this is a differentiable function in an open set, this global minimum must be a stationary point, i.e.
$$
2x +y +1=0, \quad 2y + x-4 = 0.
$$
So, the global minimum is attained at $(-2,3)$. The minimum is 2.
</s>