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.
 A: Your function takes the value one at $x=0$ and converges to one for $|x|\rightarrow\infty$. Show that it has a minimum for $x>0$ and a maximum for $x<0$. Find these by differentiating and evaluate your function at these two points. You should find that $2/3 \le  y \le 2$.
A: Use AM-GM
$0\leq\bigg|y-\dfrac43\bigg|$
$=\bigg|-\dfrac13-\dfrac1{1+x+1/x}\bigg|\leq\dfrac{2}3$
A: $y(x)$ has extremums at $x=-1$ and $x=1$, $y(-1)=2$ and $y(1)=\frac{2}{3}$, $y(-\infty)=y(+\infty)=1$, now its easy to see that $|y(x)-\frac{4}{3}|\leq \frac{2}{3}$ and we will have $=$ at those $-1,+1$ points
A: $\left|y-\frac{4}{3}\right|$ has a maximum at $x=1$ which is $k=\frac{2}{3}$
Derive $f(x)=\frac{x^2+1}{x^2+x+1}-\frac{4}{3}$ and set $f'(x)=0$. Verify that it is a maximum (for instance checking second derivative) then substitute in $\left|y-\frac{4}{3}\right|$ to get $k$.
Hope this helps.
A: $$\frac{x^2+1}{x^2+x+1}-\frac 43=1-\frac x{x^2+x+1}-\frac 43=-\frac 13-\frac x{x^2+x+1}$$
So you need to find $m$ such that $$\frac{x}{x^2+x+1}\leq m$$
Since both $m,x^2+x+1>0$ we can multiply it out we get $$ mx^2+(m-1)x+m\geq 0$$
Now we must have that $m>0$ and that $\Delta\leq 0$(discriminant), now just find the minimal $m$ that satisfies those requirements and then the minimum will be $$k=\frac 13+m$$
I'll leave it to you to find the $k$.
A: If $x=-1$ then $\left|\frac{x^2+1}{x^2+x+1}-\frac{4}{3}\right|=\frac{2}{3}$.
We'll prove that it's a maximal value.
Indeed, we need to prove that
$$\left|\frac{x^2+1}{x^2+x+1}-\frac{4}{3}\right|\leq\frac{2}{3}$$ or
$$-\frac{2}{3}\leq\frac{x^2+1}{x^2+x+1}-\frac{4}{3}\leq\frac{2}{3}$$ or
$$\frac{2}{3}\leq\frac{x^2+1}{x^2+x+1}\leq2,$$
which is true because the left inequality it's $(x-1)^2\geq0$
and the right inequality it's $(x+1)^2\geq0$.
Done!
A: 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.
