Calculation of $\max$ and $\min$ value of $f(x) = \frac{x(x^2-1)}{x^4-x^2+1}.$ 
Calculation of $\max$ and $\min$ value of $$f(x) = \frac{x(x^2-1)}{x^4-x^2+1}$$

My try: We can write $$f(x) = \frac{\left(x-\frac{1}{x}\right)}{\left(x^2+\frac{1}{x^2}\right)-1} = \frac{\left(x-\frac{1}{x}\right)}{\left(x-\frac{1}{x}\right)^2+1}$$ 
Now put $\left(x-\frac{1}{x}\right)=t,x\ne0$. Then we get $$f(t) = \frac{t}{t^2+1} = \frac{1}{2}\left(\frac{2t}{1+t^2}\right)$$
Now put $t=\tan \theta$. Then $$f(\theta) = \frac{1}{2}\frac{2\tan \theta}{1+\tan^2 \theta} = \frac{1}{2}\sin 2\theta$$
So we get $$-\frac{1}{2}\leq f(\theta)\leq \frac{1}{2}\Rightarrow f(\theta)\in \left[-\frac{1}{2}\;,\frac{1}{2}\right]$$
My question is: Is my solution right? If not, then how can we solve it?
 A: we have $x^4-x^2+1=(x^2-\frac 12)^2+\frac {3}{4}≥0$$$\frac{1}{2}-f(x)=1/2*{\frac { \left( {x}^{2}-x-1 \right) ^{2}}{{x}^{4}-{x}^{2}+1}}\geq 0$$
and $$f(x)+\frac{1}{2}=1/2*{\frac { \left( {x}^{2}+x-1 \right) ^{2}}{{x}^{4}-{x}^{2}+1}}\geq 0$$
thus $$|f(x)| \le \frac{1}{2}$$  
A: take you solution,
$$f(t)=\dfrac{t}{t^2+1}$$
since
$$f(t)=-f(-t)$$
so we only consider $t\ge 0$ Use AM-GM inequality we have
$$f(t)=\dfrac{t}{t^2+1}\le\dfrac{t}{2t}=\dfrac{1}{2}$$
A: The denominator 'factorises', giving us this:
$$f(x) = {x(x^2-1) \over (x^2-1)^2 + x^2}
$$
We can establish this is less than $1/2$ fairly easily:
$${uv \over {u^2+v^2}} \le {1 \over 2}
\iff u^2 + v^2 - 2uv  \ge 0
\iff (u-v)^2 \ge 0
$$
($u,v$ not both 0, but this holds for us.)
And equality is obtained when $u=v$, i.e. $x=x^2-1$, and this has a positive solution (which is in fact the golden ratio).
I think a sketch is instructive. Note that: 


*

*The denominator never vanishes (consider it as a quadratic in $x^2$) 

*as $x \rightarrow \infty$, $f(x) \rightarrow 0$

*$f(x)$ is an odd function


These along with the extremal value work we've just done should be enough for a sketch.
A: Your solution is almost correct. You should note that $x=0$ is neither a point of maximum or minimum, because $f(0)=0$, but $f(2)>0$ and $f(-2)<0$. So considering
$$
f(x) = \frac{\left(x-\frac{1}{x}\right)}{\left(x^2+\frac{1}{x^2}\right)-1} = \frac{\left(x-\frac{1}{x}\right)}{\left(x-\frac{1}{x}\right)^2+1}
$$
for $x\ne0$ is good: the restriction to $x\ne0$ has the same maximum and minimum values. Then the maximum and minimum values of $f$ coincide with the maximum and minimum values of
$$
g(t)=\frac{t}{t^2+1}
$$
because $t=x-1/x$ takes on every real number (twice). Since the substitution $\theta=2\arctan t$ is bijective from $\mathbb{R}$ onto $(-\pi,\pi)$, we can conclude that the function
$$
h(\theta)=\frac{1}{2}\sin\theta,
$$
on the interval $(-\pi,\pi)$, has the same maximum and minimum values as $g$ and so also as $f$. The maximum and minimum values are attained for $\theta=\pi/2$ and $\theta=-\pi/2$, respectively.
This corresponds to $t=\tan(\pi/4)=1$ and $t=\tan(-\pi/4)=-1$, respectively. From
$$
x-\frac{1}{x}=1
$$
we get
$$
x=\frac{1-\sqrt{5}}{2}\qquad\text{or}\qquad x=\frac{1+\sqrt{5}}{2}
$$
for the points of maximum for $f$. From
$$
x-\frac{1}{x}=-1
$$
we get
$$
x=\frac{-1-\sqrt{5}}{2}\qquad\text{or}\qquad x=\frac{-1+\sqrt{5}}{2}
$$
for the points of minimum for $f$.

This can be confirmed with a more tedious computation. We have
$$
f'(x)=\frac{(3x^2-1)(x^4-x^2+1)-(x^3-x)(4x^3-2x)}{(x^4-x^2+1)^2}
$$
and the numerator is
$$
N(x)=3x^6-x^4-3x^4+x^2+3x^2-1-4x^6+4x^4+2x^4-2x^2
$$
or
\begin{align}
N(x)&=-x^6+2x^4+2x^2-1\\[6px]
&=-(x^2+1)(x^4-x^2+1)+2x^2(x^2+1)\\[6px]
&=-(x^2+1)(x^4-3x^2+1)
\end{align}
Thus the derivative vanishes for
$$
x^2=\frac{3\pm\sqrt{5}}{2}=\frac{6\pm2\sqrt{5}}{4}=
\frac{(1\pm\sqrt{5})^2}{4}
$$
giving back the same points as before.
