<s>[INST] Finding smallest possible value of expression with x and y I'm not supposed to use calculus here. I'm trying to find the smallest possible value of the expression $x^2+4xy+5y^2-4x-6y+7$ for real numbers $x$ and $y$.
Here's my attempt:
$x^2+4xy+5y^2-4x-6y+7=[(x-2)^2+3)+5((y-3/5)^2-9/25)]+4xy$
$3\le (x-2)^2+3$ for all real $x$
$-9/5\le 5((y-3/5)^2-9/25)$ for all real $y$.
Thus $6/5=3-9/5\le x^2+5y^2-4x-6y+7$ for all real $x$ and $y$. $(A)$
Therefore $x^2+4xy+5y^2-4x-6y+7 \ge 6/5+4xy$ for all real $x$ and $y$. $(B)$
The equality in $B$ does only hold when equality in $A$ holds. This happens when $x=2$ and $y=3/5$.
The smallest value of $x^2+4xy+5y^2-4x-6y+7$ is then $6/5+4*2*(3/5)=6$
Is this a legitimate procedure or am I doing something wrong? I'm a bit shaky on the statement $B$ and the following implications. Let me know.
 [/INST] Let $u=x^2+4xy+5y^2-4x-6y+7$
$\iff x^2+4x(y-1)+5y^2-6y+7-u=0$
which is a quadratic equation in $x$
As $x$ is real, the discriminant must be $\ge0$
i.e., $$16(y-1)^2-4(5y^2-6y+7-u)\ge0$$
$$\iff u\ge y^2+2y+3=(y+1)^2+2\ge2$$
The equality occurs if $y+1=0$ and $x=-\dfrac{4(y-1)}2=?$  
</s>