Find $a \in \mathbb R$ such that $\sin^2(x) -\sin(x)\cos(x) - 2\cos^2(x) = a$ is solvable in $\mathbb{R}$ Find $a \in \mathbb R$ such that $\sin^2(x) -\sin(x)\cos(x) - 2\cos^2(x) = a$ is solvable in $\mathbb{R}$
I don't know how to simplify this expression further to find the conditions over $a$.
My try:
I tried to factor the LHS:
$$\sin^2(x) -\sin(x)\cos(x) - 2\cos^2(x) = a$$
$$(\sin(x)-2\cos(x))(\sin(x)+\cos(x))= a$$
$$\sqrt{10}\sin(x-\tan^{-1}(2))\sin\left(x + \frac{\pi}{4}\right) = a$$
After this, I don't know how to proceed (I don't even know if it is the right way).
Any hints?
 A: Since
$$\sin^2x=\frac{1-\cos2x}2\;,\;\;\cos^2x=\frac{\cos2x+1}2\;,\;\;\cos x\sin x=\frac12\sin2x$$
we can write your equation as
$$\frac12-\frac12\cos2x-\frac12\sin2x-\cos2x-1=a\implies-\frac12-\frac32\cos2x-\frac12\sin2x=a\implies$$
$$-3\cos2x-\sin2x=a+\frac12\implies3\cos2x+\sin2x=-a-\frac12$$
Buth
$$-3-1=-4\le3\cos3x+\sin2x\le3+1=4\implies...$$
Finish the argument
A: We just want the range of $\sin^2(x) -\sin(x)\cos(x) - 2\cos^2(x)$. If $a$ lies in this range, we can say the problem is solvable. Hint: What happens if you differentiate this and set it equal to $0$? Can you evaluate the maxima and minima using $3\sin(2x^*) - \cos(2x^*) = 0$ ?
A: Your equation can be written as
$$6\sin^2(x)-\sin(2x)=2(a+2) $$
or
$$3(1-\cos(2x))-\sin(2x)=2(a+2) $$
and
$$3\cos(2x)+\sin(2x)=-2a-1 $$
which is equivalent to
$$\sqrt{10}\cos(2x+\alpha)=-2a-1$$
thus the condition is
$$\boxed{-1\le \frac{2a+1}{\sqrt{10}}\le 1}$$
A: Hint:
For $a\sin^2x+b\sin x\cos x+c\cos^2x=d$
Divide both sides by $\cos^2x$  to find $$at^2+bt+c=d(1+t^2)\iff t^2(a-d)+bt+c-d=0$$
which is a quadratic equation in $t=\tan x$  which is real, so the discriminant must be $\ge0$
i.e., $$b^2-4(a-d)(b-d)\ge0\iff 4d^2-4(a+b)d+4ab-b^2\le0$$
If the roots of $$4d^2-4(a+b)d+4ab-b^2=0$$ are $r_1,r_2; r_1\le r_2$
$$r_1\le d\le r_2$$
We could divide  both sides by $\sin^2x$ to form a Quadratic Equation in $\cot x$ to reach at the same result.
