<s>[INST] Find all values of $a$ for which the maximum value of $f(x)=\frac{ax-1}{x^4-x^2+1}$equals $1$. Find all values of $a$ for which the maximum value of $$f(x)=\frac{ax-1}{x^4-x^2+1}$$equals $1$.
I equated $f(x)$ equal to $1$ to obtain a polynomial $x^4-x^2-ax+2=0$. Now this must have at least one repeated root.But I could not get any further.
Is there a calculus way to do it
 [/INST] Assume $a>0$. Since the denominator is always positive, maximum value of $f$ must occur when $x>0$.
Hence for all positive $x$'s,
$$\frac{ax-1}{x^4-x^2+1} \le 1 \implies x^3-x+\frac{2}{x} \ge a$$
Rewrite it as
$$2+\left(2+x+\frac{2}{x}\right)(1-x)^2 \ge a$$
The equality holds for $x=1$ and $a=2$.
Similar argumentation works for the case $a<0$ that yields $a=-2$.
</s>