<s>[INST] Is $\frac{x^2+4x+7}{x^2+x+1}$ a one-to-one function or not? Is $\frac{x^2+4x+7}{x^2+x+1}$ a one-to-one function or not?
Leaving aside the graphical method is there any other way in which I can do this question?
 [/INST] An algebraic approach:
The function is one-one if the equation in $x$
$$
k=\dfrac{x^2+4x+7}{x^2+x+1}
$$
has only one solution for any $k$ that gives real solutions.
Since $x^2+x+1 \ne 0$ we have:
$$
x^2(k-1)+x(k-4)+k-7=0
$$
and we can easely see that the discriminant of this equation can be positive, so there is some $k$ (exactly: $4-2\sqrt{3}<k<4+2\sqrt{3} $) for which we have two values of $x$ and the function is not one to one.
</s>