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
 A: 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
A: $$f(x)=\frac{ax-1}{x^4-x^2+1}\implies f'(x)=\frac{a \left(-3 x^4+x^2+1\right)+4 x^3-2 x}{\left(x^4-x^2+1\right)^2}$$
So, we need
$$a \left(-3 x^4+x^2+1\right)+4 x^3-2 x=0\tag 1$$ for an extremum and $$a x-x^4+x^2-2=0\tag 2$$ to have the maximum value of $1$.
From $(2)$,we can get $a=\frac{x^4-x^2+2}{x}$. Plug it in $(1)$ to have
$$3 x^8-4 x^6+2 x^4+x^2-2=(1-x) (x+1) \left(3 x^2+2\right) \left(x^4-x^2+1\right)=0$$ So, the only real roots are $x=\pm 1$ to which correspond $a=\pm 2$.
These are the only solutions.
A: 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$.
A: Compute the polynomial GCD of your polynomial and its derivative.
A repeated root of a polynomial is a root of its derivative.  So we want to find $a$ such that $g = \gcd(x^4 - x^2 - a x+2, 4 x^3 - 2x - a) \neq 1$.
Taking $4$ of the left and $-x$ of the right, as well as the right, we have
$$ g = \gcd(-2x^2-3ax+8, 4 x^3 - 2x - a )  \text{.}  $$
Taking $2x$ of the left and $1$ of the right, as well as the left, we have
$$ g = \gcd(-6ax^2+14x-a, -2x^2-3ax+8)  \text{.}  $$
Taking $1$ of the left and $-3a$ of the right, as well as the right, we have
$$ g = \gcd(9a^2x+14x-25a, -2x^2-3ax+8)  \text{.}  $$
We started with two polynomials equal to zero and have constructed sums of multiples of them.  Since sums of multiples of zeroes are zero, we solve the left of these:  from $9a^2x+14x-25a = 0$, $x = \frac{25a}{9a^2 + 14}$.  Notice this new denominator is always positive.  We substitute this into the right member of our most recent pair of polynomials to find
$$  \frac{27a^4 + 284a^2 - 1568}{9a^2 + 14} = 0  \text{.}  $$
Since the denominator is always positive, this is zero only when the numerator is zero.  By applying the quadratic formula, we find $a^2 = 4$, so $a = \pm 2$ or $a^2 = \frac{-392}{27}$, so $a = \pm \frac{14 \mathrm{i} \sqrt{2}}{3\sqrt{3}}$.  There is no sensible meaning of "maximum" if we allow $a$ to be non-real, so we restrict to $a = \pm 2$.
Continuing our GCDs,
\begin{align*}
g_{a = 2} &= \gcd(50x-50,-2x^2-6x+8)  \\
    &= \gcd(50x-50, x(50x-50) + 25(-2x^2-6x+8))  \\
    &= \gcd(50x-50, -200x+200)  \\
    &= \gcd(50(x-1), -200(x-1))  \\
    &= 50(x-1)  \text{.}
\end{align*}
So when $a = 2$, the double root occurs at $x = 1$.  Here, $f''(1) = -10$, so this is a local maximum.  The first derivative has one other zero at the real root of $3x^3+x^2+1$ (the factor of the numerator of $f'$ left after the factors $-2$ and $x-1$), but the second derivative is positive there, so this corresponds to a local minimum.  The only other potential critical point is any zero of $x^4 - x^2 + 1$, but this has no real roots, so there are two critical points, we have characterized them, there is one local maximum, and it is necessarily the global maximum, $\left.f(1)\right|_{a = 2} = 1$.
The analysis for $a = -2$ parallels the above, with maximum $1$ occurring at the critical point $x = -1$.
