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?
$\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}
\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}