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?
 A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
&\bbox[10px,#ffd]{%
-3\sin^{2}\pars{x} - 4\sin\pars{x} + 3 - a = 0}
\\[5mm] & \implies
0 \leq \bracks{\sin\pars{x} + {2 \over 3}}^{2} =
{13 \over 9} - {1 \over 3}\,a
\\[5mm] &\
\implies {1 \over 3}\,a \leq {13 \over 9} \implies a \leq {13 \over 3}\label{1}\tag{1}
\end{align}

In addition $\ds{\pars{~\mbox{note that} \sin\pars{x} \in \bracks{\color{red}{-1},\color{red}{1}}~}}$

\begin{align}
&\pars{\color{red}{-1} + {2 \over 3}}^{2} \leq {13 \over 9} - {1 \over 3}\,a \leq \pars{\color{red}{1} + {2 \over 3}}^{2}
\\[5mm] &
{1 \over 9} \leq {13 \over 9} - {1 \over 3}\,a \leq
{25 \over 9} \implies -4 \leq a \leq 4\label{2}\tag{2}
\end{align}

\eqref{1} and \eqref{2} lead to
  $\ds{\bbx{a \in \bracks{-4,{1 \over 3}}}}$

A: 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]$.
