Use quadratic formula to find upper and lower limits of an expression 
Using quadratic formula show that $\frac{x^2-x+1}{x^2+x+1}$ lies
  between $3$ and $\frac{1}{3}$ for all real values of $x$.

Let $\frac{x^2-x+1}{x^2+x+1}=y$, then $\frac{x^2+1}{-x}=\frac{y+1}{y-1}$
$\therefore (y-1)x^2+(y+1)x+(y-1)=0$, if $x$ is real then 
$(y+1)^2-4(y-1)(y-1)\geq 0$
$-3y^2+10y-3 \geq 0$
$(y-3)(-3y+1) \geq 0 \Rightarrow y>3 \text{ AND } y <\frac{1}{3}$
What am I doing wrong?
 A: you brought the equation till there
$$-3y^2+10y-3 \geq 0$$
divide it with -3 and reverse the inequality
$$y^2-\frac{10}{3}y+1\lt0$$
bring y in easy terms
$$\left( y-\frac{5}{3}\right)^2+1-\frac{25}{9}\lt0$$
$$\left( y-\frac{5}{3}\right)^2\lt\frac{16}{9}$$
taking square root note how I use the absolute function
$$\left| y-\frac{5}{3}\right|\lt\frac{4}{3}$$
then,
$$\frac{-4}{3}\lt y-\frac{5}{3}\lt\frac{4}{3}$$
adding $\frac{5}{3}$ throughout
$$\frac{1}{3}\lt y \lt{3}$$
hint

 just be carful when you're playing with inequalities.

A: Use the symmetries of the function. First, note that $\,y(-x)=\dfrac 1{y(x)}$, hence it is enough to obtain bounds for $x>0$.
Let's rewrite the expression:
$$y=\frac{x^2-x+1}{x^2+x+1} =\frac{x+\cfrac 1x-1}{x+\cfrac 1x+1}$$
so, setting $u=x+\dfrac1x$, we have 
$$y=\dfrac{u-1}{u+1}=1-\frac2{u+1},$$ 
which is an increasing  function of $u$. Note that, if $x>0$, $u\ge 2$, so, for $x\ge 0$, we have:
$$1-\frac23=\frac13\le y \le 1$$
If $x<0$, we deduce that 
$$1\le y(-x)=\frac 1{y(x)}\le 3.$$
Grouping these inequalities, we obtain that in all cases:
$$\frac13\le y\le 3.$$
A: You said:

$$(y-3)(-3y+1) \geq 0 \Rightarrow y>3 \text{ AND } y <\frac{1}{3}$$

No, this isn't true. We have three options:


*

*Both factors are positive $y>3 \text{ AND } y <\frac{1}{3}$, no $y$ statistifies this. 

*Both factors are zero $y=3 \text{ AND } y=\frac{1}{3}$, no $y$ statistifies this. 

*Both factors are negative $y<3 \text{ AND } y >\frac{1}{3}$, so $\frac{1}{3}<y<3$.


In general, this isn't how you should solve these kind of equations. Instead, solve the equation (not the inequality, so change $>, \geq, < , \leq$ to $=$) and look to the graph.
