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?

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.

