Minimum value of $\frac{pr}{q^2}$ in quadratic equation If $y^4-2y^2+4+3\cos(py^2+qy+r)=0$ has $2$ solutions and $p,q,r\in(2,5)$. Then minimum of $\displaystyle \frac{pr}{q^2}$ is.
solution I try
$$-3\cos(py^2+qy+r) =(y^2-1)^2+3\geq 3$$
$$\cos(py^2+qy+r)\leq -1\implies \cos(py^2+qy+r)=-1$$
$$py^2+qy+r=(4n+1)\pi\implies py^2+qy+r-(4n+1)\pi=0$$
for real and distinct roots  
$$q^2-4p[r-(4n+1)\pi ]\geq 0$$
How do I find minimum of $\displaystyle \frac{p r}{q^2}$? Help me.
 A: The condition for
$$
y^4-2y^2+4+3\sigma(y)=0
$$
with $-1 \le \sigma(y) \le 1$
to have real roots is that $\sigma(y) = -1$ or $p y^2+q y+ r = \pi$ but then $y = y_0 = \pm 1$ hence
$$
\min \frac{pr}{q^2}\\
\mbox{subjected to}\\
p y^2_0+q y_0 + r = \pi \\
(p,q,r)\in (2,5)^3
$$
and the minimum value is $\frac{1}{2(2-\pi)}$ for both $y_0 = \pm 1$
As example of solution
$$
p = 2\\
q = 2(\pi-2)\\
r = 2-\pi
$$
A: Rewrite the equation as $(y^2 - 1)^2 + 3 (1 + \cos (py^2 + qy + r)) = 0$. Both terms on the LHS are manifestly non-negative, so the equation is solved only when both terms are zero. The only possible solutions are $y = \pm 1$, and both are obtained only when $p+q+r$ and $p-q+r$ are both odd multiples of $\pi$. As $2 < p-q+r < p+q+r < 15$, this is only possible if $p - q + r = \pi$ and $p + q + r = 3\pi$, which can be solved to give $q = \pi$ and $p + r = 2\pi$. The quantity to minimize is thus $$\frac{pr}{q^2} = \frac{p (2\pi - p)}{\pi^2}$$ which takes possible values $$\frac{10\pi - 25}{\pi^2} < \frac{pr}{q^2} \leq 1,$$ the maximum attained at $p = \pi$ and the infimum (not strictly a minimum, as the allowable interval for $p$ is open) obtained at the endpoint $p = 5$.
