Question on finding maximum of AM GM inequality How can i solve for minimum value of function $f(x)=\frac{x^2+x+1}{x^2-x+1} $ using AM GM inequality.
I am aware about the AM GM inequality, but am not able to split the terms into the correct form in order to apply the inequality
 A: we prove the answer is $\frac{1}{3}$ which happens at $x=-1$ for proving it we have :
$$\frac{x^2+x+1}{x^2-x+1} \ge \frac{1}{3}$$
if and only if
$$3x^2+3x+3 \ge x^2-x+1$$
if and only if
$$2x^2+4x+2=2(x+1)^2 \ge 0$$
[edit] if you think that it is not AM_GM here is a solution which is the same but the use of AM_GM is more clear on it.
$$\frac{x^2+x+1}{x^2-x+1}=1+\frac{2}{x+\frac{1}{x}-1} \ge 1 +\frac{2}{-2-1}= \frac{1}{3}$$
(we used $\frac{1}{x+\frac{1}{x}-1}\ge \frac{1}{-3}$ for possitive $x$ it is trivially true and for negative ones it is an AM_GM on $-x+\frac{-1}{x} \ge 2$)
A: If $\frac{x^2+x+1}{x^2-x+1} > k$ for all $k \in \mathbb R$, since $x^2+x+1 = (x-0.5)^2+0.75 > 0$, $x^2+x+1 > kx^2-kx+k$ or $(k-1)x^2+(-k-1)x+k-1<0$ again for all real $k$.
For the maximum such $k$, the discriminant must be zero, or $(k+1)^2 - 4(k-1)^2 = 0$ which gives $k=\frac{1}{3}, 3$. This gives the maximum and the minimum, as the process is the same with the maximum, just with the inequality sign being flipped.
