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.
 A: let $a = (x^2 - 5x + 4)$
For what values of $a$ is
$a(y^2 + y + 1)< 2y$?
$(ay^2 + (a-2) y + a)< 0$ for all $y$
$a<0$ and $(ay^2 + (a-2) y + a)$ has no real roots.
$(a-2)^2 - 4a^2 < 0\\
-3a^2 - 4a + 4 <0\\
-(3a -2)(a+2)<0$
$a<- 2$  
$x^2 - 5x + 4 < - 2$
and solve for $x$ 
A: $$(x^2−5x+4)(y^2+y+1)<2y$$
$y^2+y+1$ is positive, because it is smallest at $y=-\frac{1}{2}$, and substituting that gives something positive.
Therefore we can divide by $y^2+y+1$ without changing the direction of the inequality.
$$x^2−5x+4<\frac{2y}{y^2+y+1}$$
We want this to be true for all values of $y$. In particular it has to be true when the$ \frac{2y}{y^2+y+1}$ is at its smallest, which is when it places the tightest restriction on the left hand side.
To minimise $\frac{2y}{y^2+y+1}$, you can look at where its derivative changes sign from negative to positive (which is at $y=-1$) or do the trick that DougM did in the other answer (setting it equal to $a$, and finding the smallest $a$ for which the quadratic in $y$ still has a solution). Either way, the minimal value is $-2$.
This gives:
$$x^2−5x+4<-2\\
(x-5/2)^2-25/4+4<-2\\
(x-5/2)^2<1/4\\
-1/2<x-5/2<1/2\\
2<x<3$$
A: 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\,}$$
