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.
 A: Another way to view the situation is that you are solving a system of two equations
$$x^2 + y^2 = 1$$
$$Ax^2 + By^2 + Cxy + Dx + Ey + F = 0$$
The first is just the unit circle, and using linear algebra you can show the second is a conic section if it's not empty or a single point (so a parabola, line, hyperbola, ellipse, or a circle). So you're asking for the number of intersection points for this circle and conic section. It can be anywhere between $0$ and $4$ depending on the exact scenario.
How to find exactly how many and their values is an annoying calculation. One thing that can help is to rotate coordinates so that $C = 0$, and then solve the new equations directly. I believe you get a quartic equation whose roots determine the exact solutions and how many of them are real.
A: Depends on your specific problem (such as those specific coefficients), and maybe you can try this:
Method.1: (delicate)
This is a quadratic form, and you can use eigenvalue-eigenvector method to transform it into a standard form (get rid of linear terms and cross terms), so find the transformation matrix.
Method.2: (brute)
Let $y=\sin(x)$, $\cos(x)=\pm\sqrt{1-y^2}$, and the equation goes to:
$$\pm(Cy+D)\sqrt{1-y^2}=-A(1-y^2)-By^2-Ey-F$$
Square them on both sides and use solution formula for $4$-th order polynomial.
A: 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.
