There is given an equation,
$$ \frac{x^2-x+1}{x^2+x+1}=kx+1$$
When does this solution have one, two, three real solution(s) in $x$.
My Approach:
The above equation can be rewritten as,
$$\frac{-2x}{x^2+x+1}=kx$$
This forms a cubic equation in $x$ where $0$ is a universal solution. So, then canceling $x$ gives a quadritic equation and which can add either $0,1,2$ more solutions according to value of discriminant of equation ($D<0,D=0,D>0$) respectively.
But this gave,
$k\in \bigg(-\infty,\frac{-8}{3}\bigg)\cup[0,\infty)$ for one solution
$k=\frac{-8}{3}$ for two solutions
$k\in\bigg(\frac{-8}{3},0\bigg)$ for three solutions
But my textbook has different answer for second and third part. Where Am I wrong? And if you know different method to this problem please post that, I am glad to know alternatives.
Another approach to this problem is the graphical method. It isn't hard to plot a rough graph for $f(x)=\frac{x^2-x+1}{x^2+x+1}$. Which is shown below,
It touches $y=1$ at $x\rightarrow±\infty$.
Note that $g(x)=kx+1$ has the same $y-$intersept as that of $f(x)$.
Let for $k=k_1$ $g(x)$ is tangent to $f(x)$.
Appling condition of tangency gives,
$k_1=-2$ at $x=0$ and cuts again at $x=-1$ like this,
$k_1=-\frac{8}{3}$ at $x=-\frac{1}{2}$ and obviously cuts at $x=0$ like this,
So, looking at the graph for intersects will give,
$k\in\bigg(-\infty,-\frac{8}{3}\bigg)\cup[0,\infty)$, for one solution
$k=-\frac{8}{3},-2$, for two solutions
$k\in\bigg(-\frac{8}{3},0\bigg)-\{2\}$
Mistake in your solution: