# 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.

• Your attempt did not use the specific expression in $x$ for $y$. Substitute it. Jun 30, 2017 at 9:33
• See my answer here : math.stackexchange.com/questions/443322/… Jun 30, 2017 at 9:40
• @labbhattacharjee I've used your method to solve it. and I got $k=\frac{2}{3}$ Thanks a lot Jun 30, 2017 at 9:58

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$.

$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

$\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.

$$\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$.

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!

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.

Use AM-GM

$0\leq\bigg|y-\dfrac43\bigg|$ $=\bigg|-\dfrac13-\dfrac1{1+x+1/x}\bigg|\leq\dfrac{2}3$

• You don't even need AM-GM inequality: it's well known $x+\dfrac1 x\ge2$ for all $x\ne 0$. Jun 30, 2017 at 9:43
• @FarrukhAtaev: Oh! yes, of course. Jun 30, 2017 at 10:04
• @Takahiro Waki Your $x+\frac{1}{x}\geq2$ is wrong! Try $x=-2$. Jun 30, 2017 at 11:29
• @MichaelRozenberg But I don't say $x+\frac1x\geq 2$. Jun 30, 2017 at 11:31
• @Takahiro Waki Explain please your reasoning. How you used AM-GM? Jun 30, 2017 at 11:33