I was trying to find the range of $x^2 + 2xy + 3y^2 - 6x - 2y$.
So, i made it equal to $S$ and solved for y to get its roots and optimize the expression for real values.
Clearly, the expression inside the square root (which is the discriminant), should be more than or equal to $0$ for real values of y. The discriminant, here, is $-8x^2 + 64x + 12S + 3$.
So, if y has to be real, $-8x^2 + 64x + 12S + 3$ has to more than or equal to $0$.
But note that the expression here is a downward opening parabola, which cannot be more or equal to $0$ for all real values. Then this implies that there does not exist any value of x and y such that $x^2 + 2xy + y^2 - 6x - 2y$ holds real values. But this is contradictory, as there are many values for which the expression reaches real values. Then where am I making the mistake?
NOTE: I'm asking y'all to point out my mistake only. I'm not asking for solutions to this question. I've been able to solve this but I'm not able to explain the contradictory situations that are arising here.
$$E=x^2 + 2xy + 3y^2 - 6x - 2y = (x+y)^2+2y^2-6x-2y$$
Put $z = x+y$ and express $x=z-y$. So we get $$E= z^2+2y^2-6z+6y-2y = z^2+2y^2-6z+4y = 2(y+1)^2-2+(z-3)^2-9$$
So $E_{\min} = -11$ and $E$ does not have maximum.