Where am I making the mistake? 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. 
 A: $$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.
A: why don't you try this?
let $$f(x,y)=x^2+2xy+3y^2-6x-2y$$ then we get
$$\frac{\partial f(x,y)}{\partial x}=2x+2y-6$$
and
$$\frac{\partial f(x,y)}{\partial y}=2x+6y-2$$
and solve the System
$$2x+2y-6=0$$
$$2x+6y-2=0$$
A: Let $$x^2+2xy+3y^2-6x-2y=k$$
$$\iff x^2+2x(y-3)+3y^2-2y-k=0$$
As $x$ is real, the discriminant must be $\ge0$
i.e.,  $$(y-3)^2-(3y^2-2y-k)\ge0$$
$$\iff k\ge2y^2+4y-9=2(y+1)^2-2-9\ge-11$$ 
A: Actually, -8x^2 + 64x + 12S + 3 doesn't need to be more than or equal to 0 for ALL real x, y, s. In x^2 + 2xy + 3y^2 - 6x - 2y = S, consider S to hold any PARTICULAR value >= -11. Then think about this: if the discriminant has to be more than or equal to 0 for all real x's, it would mean that the parent expression must also be defined for all real x, which is certainly not true for any given value of S. 
-8x^2 + 64x + 12S + 3 (subject to S >= -11) is more than 0 for selected values of x and not all real x. 
Thank you everybody for whatever efforts they had imparted to this question. 
