<s>[INST] If $(x^2-5x+4)(y^2+y+1)<2y$ for all real values of $y$ then what interval does $x$ belong to? Okay so I'm stuck on this one for a long time :

If $(x^2-5x+4)(y^2+y+1)<2y$ for all real values of $y$ then what interval does $x$ belong to? 

My Try: Since $y$ can take any real value, I tried multiplying the first two terms and formed a quadratic equation in $y$ with its coefficients and the constant term in terms of $x$. Then I applied the two conditions as:


*

*Coefficient of $y^2$ should be negative ; and 

*Discrimnant should also be negative. 
Am I correct? What am I doing wrong? Is there a better approach to solve similar problems like this one? Please let me know.
 [/INST] First, notice that $y^2+y+1$ is positive for all real values of $y$. 
This means that we can divide by $y^2+y+1$ on both sides of the inequality, without having to worry about negative values that would change the direction of the inequality.

Divide by $y^2+y+1$ on both sides:
$$x^2 -5x + 4 < \frac{2y}{y^2+y+1}$$

We can find the minima and maxima of the rational function of $y$ on the right hand side, by taking its derivative and setting it equal to zero:
$$\frac{\mathrm{d}}{\mathrm{d}y}\left(\frac{2y}{y^2+y+1}\right) = 0$$
$$\frac{2-2y^2}{\left(y^2+y+1\right)^2}=0$$
Since the denominator is always positive, we can simply eliminate it and divide by $2$:
$$1-y^2 = 0$$
$$y=\pm 1$$
This means that $2y/\left(y^2+y+1\right)$ achieves a minimum value of $-2$ at $y=-1$, and achieves a maximum value of $2/3$ at $y=1$. Therefore,
$$-2 \leq \frac{2y}{y^2+y+1}\leq \frac{2}{3}$$

At the boundary values for the right hand side, the inequality becomes:
$$x^2 - 5x + 4 < -2\,\, \implies\,\, x^2 - 5x + 6 < 0$$
$$x^2 - 5x + 4 < \frac{2}{3}\,\, \implies\,\, x^2 -5x + \frac{10}{3} <0 $$
Here, the first inequality is a tighter bound for $x$ than the second inequality, so we may only consider the first:
$$x^2 - 5x + 6 < 0$$
Factoring gives:
$$(x-2)(x-3)<0$$
This is a concave-up parabola with zeroes at $x=2$ and $x=3$. This means that the range of values for which the quadratic is negative is exactly between the two roots:
$$\boxed{2 < x < 3\,}$$
</s>