<s>[INST] Conditions for $A\cos^2(x)+B\sin^2(x)+C\sin(x)\cos(x)+D\cos(x)+E\sin(x)+F = 0$ to have (a) real root(s) I am doing research on Linear Algebra and encounter a function in the form like below:
$$A\cos^2(x)+B\sin^2(x)+C\sin(x)\cos(x)+D\cos(x)+E\sin(x)+F = 0$$
What are the conditions that the coefficients of the equation need to satisfy for it to have (a) real root(s)? I am just wondering if there are some known results for the problem.
 [/INST] The conic section given in Zarrax's answer,
$$Ax^2 + By^2 + Cxy + Dx + Ey + F = 0$$
can be reordered into a simple quadratic in terms of either $x$ or $y$:
$$Ax^2 + (Cy + D)x + (By^2 + Ey + F) = 0$$
$$By^2 + (Cx + E)y + (Ax^2 + Dx + F) = 0$$
Plugging the coefficients into the quadratic formula, we get:
$$x = \frac{-(Cy + D) \pm \sqrt{(Cy + D)^2 - 4A(By^2 + Ey + F)}}{2A}$$
$$y = \frac{-(Cx + E) \pm \sqrt{(Cx + E)^2 - 4B(Ax^2 + Dx + F)}}{2B}$$
In order for a real solution to exist, both discriminants must simultaneously be non-negative, i.e.,
$$(Cy + D)^2 - 4A(By^2 + Ey + F) \ge 0$$
$$(Cx + E)^2 - 4B(Ax^2 + Dx + F) \ge 0$$
We can add these together to get:
$$(Cy + D)^2 - 4A(By^2 + Ey + F) + (Cx + E)^2 - 4B(Ax^2 + Dx + F) \ge 0$$
$$C^2y^2 + 2CDy + D^2 - 4ABy^2 - 4AEy - 4AF + C^2x^2 + 2CEx + E^2 - 4ABx^2 - 4BDx - 4BF \ge 0$$
$$C^2(x^2 + y^2) - 4AB(x^2 + y^2) + (2CE - 4BD)x + (2CD - 4AE)y - 4AF - 4BF + D^2 + E^2 \ge 0$$
But any solution must also lie on the unit circle $x^2 + y^2 = 1$, so this simplifies slightly to:
$$C^2 - 4AB + (2CE - 4BD)x + (2CD - 4AE)y - 4AF - 4BF + D^2 + E^2 \ge 0$$
$$(2CE - 4BD)x + (2CD - 4AE)y \ge 4(AB + AF + BF) - (C^2 + D^2 + E^2)$$
Now, define the function:
$$f(\theta) = (2CE - 4BD)\cos(\theta) + (2CD - 4AE)\sin(\theta)$$
Recall that
$$\alpha \cos(\theta) + \beta \sin(\theta) = \sqrt{\alpha^2 + \beta^2} \sin(\theta + \tan^{-1}(\frac{\alpha}{\beta}))$$
So the amplitude of the sine wave defined by $f$ is:
$$\sqrt{(2CE - 4BD)^2 + (2CD - 4AE)^2}$$
$$\sqrt{4C^2E^2 - 16BCDE + 16B^2D^2 + 4C^2D^2 - 16ACDE + 16A^2E^2}$$
$$2 \sqrt{C^2E^2 - 4BCDE + 4B^2D^2 + C^2D^2 - 4ACDE + 4A^2E^2}$$
$$2 \sqrt{C^2(D^2 + E^2) + 4(A^2E^2 + B^2D^2) - 4(A + B)CDE}$$
Thus, a necessary condition for the original equation to have real solutions is:
$$2 \sqrt{C^2(D^2 + E^2) + 4(A^2E^2 + B^2D^2) - 4(A + B)CDE} \ge 4(AB + AF + BF) - (C^2 + D^2 + E^2)$$
There's probably a way to simplify this further, though.
</s>