
Problem 1. Find all the values of the real parameter $p$, for which the range of the function

$$
f(x)=\frac{2(1-p)+\cos x}{p-\sin ^{2} x}
$$

contains the interval $[1,2]$.


Solution. Let $y=\cos x$. The problem is to find all values of $p$, such that for every $k \in[1,2]$ the equation

$$
\frac{2(1-p)+y}{p-1+y^{2}}=k
$$

has at least one root $y_{0} \in[-1,1]$, i.e. we should find all values of $q=1-p$ such that for every $k \in[1,2]$ the equation

$$
k y^{2}-y-q(k+2)=0
$$

has at least one root $y_{0}^{2} \neq q, y_{0} \in[-1,1]$.

If $y_{0}^{2}=q$, then $-y_{0}-2 q=0, y_{0}=-2 q$ and $4 q^{2}=q$, i.e. $q_{1}=0$ or $q_{2}=\frac{1}{4}$.

If $q=0$ the roots of the equation $k y^{2}-y=0$ are $y_{1}=0, y_{2}=\frac{1}{k}$. But $y_{2}=\frac{1}{k} \in[-1,1]$ and $y_{2}^{2} \neq q=0$ for every $k \in[1,2]$. Thus $q=0$ satisfies the problem's conditions.

If $q=\frac{1}{4}$, then the roots of the equation $k y^{2}-y-\frac{1}{4}(k+2)=0$ are $y_{1}=-\frac{1}{2}, y_{2}=\frac{1}{2}+\frac{1}{k}$. But $y_{2} \in[-1,1]$ only if $k=2$. Thus $q=\frac{1}{4}$ doesn't satisfy the problems conditions.

Let $q \neq 0$ and $q \neq \frac{1}{4}$. The equation $k y^{2}-y-q(k+2)=0$ has real roots iff $D=1+4 k(k+2) q \geq$ 0 , i.e. iff $q \geq-\frac{1}{4 k(k+2)}$ for every $k \in[1,2]$. Hence $q \geq-\frac{1}{32}$. The vertex of the parabola $g(y)=k y^{2}-y-q(k+2)$ has as its first coordinate $y^{\prime}=\frac{1}{2 k} \in(0,1] \subset[-1,1]$. Therefore the equation $g(y)=0$ has at least one root $y_{0} \in[-1,1]$ iff at least one of the inequalities $g(-1) \geq 0$ and $g(1) \geq 0$ holds. It is easy to obtain from here that $q \leq \frac{k+1}{k+2}$ for every $k \in[1,2]$. Hence $q \leq \frac{2}{3}$, i.e. $q \in\left[-\frac{1}{32}, \frac{2}{3}\right]$ and $q \neq \frac{1}{4}$.

Finally $p \in\left[\frac{1}{3}, \frac{33}{32}\right], p \neq \frac{3}{4}$.
