For which values of the parameter $p$ does the inequality

$$
\left(1+\frac{1}{\sin x}\right)^{3} \geq \frac{p}{\tan^{2} x}
$$

hold for any $0<x<\frac{\pi}{2}$?
Solution. The left side of the inequality and the denominator on the right side are always positive, so the inequality is certainly satisfied if the value of $p$ is negative or zero. In the following, we examine the positive values of $p$.

Multiply by the positive $\sin ^{3} x$, and use the identity

$$
\frac{1}{\operatorname{tg}^{2} x}=\frac{(1-\sin x)(1+\sin x)}{\sin ^{2} x}
$$

to get:

$$
(1+\sin x)^{3} \geq p \sin x(1-\sin x)(1+\sin x)
$$

and thus

$$
(1+\sin x)^{2} \geq p \sin x(1-\sin x)
$$

After rearrangement, we obtain the following quadratic inequality in $\sin x$:

$$
(1+p) \sin x^{2}+(2-p) \sin x+1 \geq 0
$$

Here, if $p \leq 2$, every term on the left side is non-negative, so the inequality is obviously satisfied.

If $p>2$, then in the case where the equation $(1+p) y^{2}+(2-p) y+1=0$ has real roots, the sum of the roots is $p-2>0$, and their product is the also positive $\frac{1}{1+p}2$ in the case when the discriminant is not positive:

$$
0 \geq(2-p)^{2}-4(1+p)=p^{2}-8 p=p(p-8)
$$

that is, if $p \leq 8$.

Therefore, the numbers $p \leq 8$ satisfy the condition of the problem.