What is the maximum value of $\frac{x^2+x+1}{x^2-x+1}$ I tried to solve it and I got answer '3'. But that is just my intuition.I don't have concrete method to prove my answer .I did like this, in order to maximize the fraction, we need to minimize the denominator .So if plug in '1' in expression,    denominator becomes '1'.Now denominator is minimalized,the result of expression is '3'. Thats how I got to conclusion.But I can't prove that " 3  is the solution" mathematically.
Can anyone show me how to prove it properly
 A: Hint: $$y= \frac{x^2+x+1}{x^2-x+1}=\frac{x+1+{1\over x}}{x-1+{1\over x}} = {t+2\over t} = 1+{2\over t}$$
where $t=x-1+{1\over x}$. Since for positive $x$ have $$x+{1\over x}\geq 2 \implies t\geq 1 \implies y\leq 3$$ and for negative $x$ we have $$x+{1\over x}\leq -2 \implies t\leq -3 \implies y\geq -1$$. 
A: Yes, the maximum is $3$. Note that $x^2-x+1$ is always greater than $0$ and that$$\frac{x^2+x+1}{x^2-x+1}-3=-2\frac{x^2-2x+1}{x^2-x+1}=-2\frac{(x-1)^2}{x^2-x+1}<0,$$unless $x=1$.
A: You have the correct result but the wrong reasons.
First of all, you assume that a ratio can be maximized by minimizing the denominator. This is true if the numerator is constant, but the numerator here is not constant.
Second, you decided that the minimum value of the denominator is $1.$
That is not true.
The minimum value of $x^2 - x + 1$ is $\frac34,$ which is attained when $x=\frac12.$
You tried to apply some intuition, which is a good thing to try,
but then you questioned the intuition, which is also a good thing to do.
A: Hint: It is $$\frac{x^2+x+1}{x^2-x+1}\le 3$$ if $$x^2+x+1\le 3x^2-3x+3$$ and this is true since $$0\le x^2-2x+1$$ . This is $$(x-1)^2\geq 0$$ and the equal sign holds if $$x=1$$
