<s>[INST] If $x$ is real, evaluate $k$ in absolute inequality 
If $x$ is real and $$y=\frac{(x^2+1)}{x^2+x+1}$$ then it can be shown that $$\left|y-\frac{4}{3}\right|\leq k$$ Evaluate $k$

My attempt,
\begin{align}\left(y-\frac{4}{3}\right)^2&\leq k^2\\
\sqrt{\left(y-\frac{4}{3}\right)^2}&\leq k\end{align}
I don't know how to proceed anymore. Thanks in advance.
 [/INST] This solution builds on the idea mentioned by @Bernard in one of the comments above. 
Let $u=x+\dfrac 1x$.   
$$y=\frac {x^2+1}{x^2+x+1}=\frac {x+\frac 1x}{x+1+\frac 1x}=\frac u{u+1}=\frac 1{\frac 1u+1}$$
For $x>0$, we have $u>0$, and $u_{\text{min}}=2$*.   


*

*Hence $y_\text{min}=\dfrac 1{\frac 1{u_{\text{min}}}+1}=\dfrac 23$   


For $x<0$, we have $u<0$, and $u_{\text{max}}=-2$*.   


*

*Hence $y_\text{max}=\dfrac 1{\frac 1{u_\text{max}}+1}=2$


In summary, 
$$\begin{align}
\frac 23&\le &y&\le 2\\
-\frac 23&\le &y-\frac 43&\le \frac 23\\
& &\bigg| y-\frac 43\bigg|&\le \color{red}{\frac 23}
\end{align}$$
Graph below shows $y=\frac {x^2+1}{x^2+x+1}$.


*can be shown easily using simple calculus.
</s>