Problem 12.3. Find all values of the real parameter $a$ such that the image of the function

$$
f(x)=\frac{\sin ^{2} x-a}{\sin ^{3} x-\left(a^{2}+2\right) \sin x+2}
$$

contains the interval $\left[\frac{1}{2}, 2\right]$.

Nikolai Nikolov
12.3. Set $t=\sin x$ and $g(t)=\frac{t^{2}-a}{t^{3}-\left(a^{2}+2\right) t+2}$.

If the nominator and the denominator of $g$ have a common root then $a \geq 0$ and $t= \pm \sqrt{a}$. If $t=-\sqrt{a}$ we obtain $\sqrt{a}\left(a^{2}-a+2\right)=-2$, which is impossible since $a^{2}-a+2>0$ for every $a$. If $t=\sqrt{a}$ we obtain $\sqrt{a}(a(a-1)+2)=2$ and it is easy to see that $a=1$ is the only solution of this equation (for $a \in[0,1$ ) the left hand side is less than 2 , and for $a>1$ it is greater than 2 ). For $a=1$ we have

$$
g(t)=\frac{t^{2}-1}{t^{3}-3 t+2}=\frac{t+1}{(t-1)(t+2)} \leq 0
$$

for every $t \in[-1,1)$ which implies that this value of $a$ is not a solution.

We now look for $a \neq 1$ such that the equation $g(t)=c$, i.e.

$$
h(t)=c\left(t^{3}-\left(a^{2}+2\right) t+2\right)+a-t^{2}=0
$$

has a solution in the interval $[-1,1]$ for every $c \in\left[\frac{1}{2}, 2\right]$. For $c \geq \frac{1}{2}$ we have

$$
h(-1)=c a^{2}+a+3 c-1 \geq \frac{a^{2}}{2}+a+\frac{1}{2}=\frac{(a+1)^{2}}{2}
$$

whence $h(-1) \geq 0$ for every $a$. Also, $h^{\prime}(t)=3 c t^{2}-2 t-c\left(a^{2}+2\right)$ and therefore $h^{\prime}(1)=c-c a^{2}-2 \leq 0$ for $c \in\left[\frac{1}{2}, 2\right]$ and every $a$. Hence the equation $h^{\prime}(t)=0$ has real roots $t_{1}$ and $t_{2}$ such that $t_{1} \leq 11$ this inequality is satisfied since $1-\frac{1}{2}(1+a)1$. Then $t_{0} \neq 1, \lim _{t \rightarrow t_{0}+0} g(t)=+\infty$ and $g(1)=\frac{1-a}{1-a^{2}}=$ $\frac{1}{1+a}0$ for $t \in[-1,1]$, which implies that $g(t)$ is a continuous function in that interval.

Indeed, if $t \in[-1,0]$, then $h(t) \geq t^{3}+2>0$ and if $t \in(0,1]$, then $h(t)>t^{3}-3 t+2=(t-1)^{2}(t+2) \geq 0$.

Case 4.1. If $a \in\left(-1,-\frac{1}{2}\right]$, then $g(-1)=\frac{1-a}{a^{2}+3}0$ in this interval, we have to check that

$$
t^{2}0, t \in[-1,1]
$$

We have

$$
m^{\prime}(t)=6 t^{2}-2 t-2\left(a^{2}+2\right) \leq 6 t^{2}-2 t-4=(6 t+4)(t-1)
$$

and therefore $m^{\prime}(t) \leq 0$ in the interval $\left[-\frac{2}{3}, 1\right]$. Hence $m(t)$ is a decreasing function in this interval which implies that

$$
m(t) \geq m(1)=-2 a^{2}+a+1=(1+2 a)(1-a)>0
$$

for any $t \in\left[-\frac{2}{3}, 1\right]$. On the other hand, we have

$$
m(t) \geq 2 t^{3}-t^{2}+a+4 \geq-2-1-\frac{1}{2}+4>0
$$

for $t \in[-1,0]$, which completes the proof of (1).

The cases considered above cover all possibilities for $a$ and we conclude that the answer is $a \in\left(-\infty,-\frac{1}{2}\right] \cup(1,+\infty)$.