Find $a$ such that $-3\sin^{2}(x)-4\sin(x)+3-a=0$ has solution I have the function $f:[0,2\pi]\rightarrow \mathbb{R},f(x)=3\cos^{2}(x)-4\sin(x)$
I need to find the values of $a$, a real parameter such that $f(x)=a$ has solution.
My try:I got $-3\sin^{2}(x)-4\sin(x)+3=a$ so $-3\sin^{2}(x)-4\sin(x)+3-a=0$
I noted $\sin(x)=t$ and I got a quadratic equation and I put the condition that the discriminant to be $\geq0$ and I got $a\leq\frac{13}{3}$ and the right answer is $[-4,\frac{13}{3}]$
Which condition I forgot?

Consider the function
$$
f(x)=3\cos^2x-4\sin x=-3\sin^2x-4\sin x+3
$$
Then $f'(x)=-6\sin x\cos x-4\cos x=-2\cos x(3\sin x+2)$. The derivative vanishes for $x=\pi/2$, $x=3\pi/2$, $x=\arcsin(-2/3)$ and $x=\pi-\arcsin(-2/3)$.
The second derivative is
$$
f''(x)=12\sin^2x+4\sin x-6
$$
and $f''(\pi/2)=10>0$, $f(3\pi/2)=2>0$, $f''(\arcsin(-2/3))=f''(\pi-\arcsin(-2/3))=-10/3<0$.
Thus the function has points of maximum at $\arcsin(-2/3)$ and $\pi-\arcsin(-2/3)$, with
$$
f(\arcsin(-2/3))=f(\pi-\arcsin(-2/3))=-3\cdot\frac{4}{9}+\frac{8}{3}+3=\frac{13}{3}
$$
and points of minimum at $\pi/2$ and $3\pi/2$, with
$$
f(\pi/2)=-4,\qquad f(3\pi/2)=4
$$
Thus the range of the function is $[-4,13/3]$ and the equation $f(x)=a$ only has solutions for $a\in[-4,13/3]$.
