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.

minimal trickery, I see $u = x + 2y,$ so $4u = 4x+8y,$ your expression becomes
$$  u^2 + y^2 - 4u + 2y + 7,  $$
$$ u^2 - 4 u + y^2 + 2 y + 7, $$
$$ (u-2)^2 - 4 + (y+1)^2 - 1 + 7, $$
$$ (u-2)^2 + (y+1)^2 + 2 $$
least value, $2,$ occurs when $y=-1$ and $x+2y = x - 2 = 2,$ so $x=4$ and $y=-1$
