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

Let $g(x) = x^4-x^2-ax+2 = 0$
We need to find $a$ such that $g(x)$ has a repeated root
$g'(x) = 4x^3 - 2x - a$
Now, for a repeated root, there should be common root between $g'(x)$ and $g(x)$
Now,let $p$ be a common root of $g'(x)$ and $g(x)$
$$a = 4p^3 - 2p$$
$$\implies p^4-p^2-(4p^3-2p)p+2 = 0$$
$$\implies 3p^4-p^2-2 = 0$$
Now what are the roots of this? You can use the quadratic formula to solve for $p$ which solves this, and get each corresponding $a$
EDIT
On solving the above, you get $p = 1,-1$
For the above values of $p$, you get $a = 2,-2$ as the only solutions
