Solving the system: gives which you have found. That is the quadratic equation , where , , Its discriminant is . Substituting, which simplifies to The discriminant must be 0 in order for there to be only one solution where the ellipse just touches each side of the square at only one point. can only be true if and only if Any of the four lines x+y=k, x-y=k, -x+y=k,-x-y=k gives the same discriminant, when solved simultaneously with the ellipse. So is the necessary and sufficient condition. Edwin