How to find the maximum and minimum values of $\frac{8x(x^2-1)}{(x^2+1)^2}$ algebraically? The function is $f(x) = \frac{8x(x^2-1)}{(x^2+1)^2}$.
I have tried using calculus, only to fail.
 A: HINT: prove that $$-2\le \frac{8x(x^2-1)}{(x^2+1)^2}\le 2$$
we have $$2-\frac{8x(x^2-1)}{(x^2+1)^2}=2\,{\frac { \left( {x}^{2}-2\,x-1 \right) ^{2}}{ \left( {x}^{2}+1
 \right) ^{2}}}
$$
and $$2+\frac{8x(x^2-1)}{(x^2+1)^2}=2\,{\frac { \left( {x}^{2}+2\,x-1 \right) ^{2}}{ \left( {x}^{2}+1
 \right) ^{2}}}
$$
the Minimum will be attained by $$x=-1-\sqrt{2}$$ and the Maximum by $$1-\sqrt{2}$$
A: Nice challenge. The range of such function is made by the real numbers $k$ such that
$$ \frac{8x(x^2-1)}{(x^2+1)^2} = k $$
has at least a real solution. The previous equation is equivalent to
$$ k x^4 - 8x^3 + 2kx^2 +8x + k = 0$$
and the discriminant of the LHS equals $2^{16}(k^2-4)^2$. It follows that the range of the given function is the interval $[-2,2]$.

Fun fact: by substituting $x=\tan\theta$ the given expression turns into $-2\sin(4\theta)$ and the whole problem becomes trivial. Does trigonometry count as algebra?
A: Suppose $b$ is in the range of the given function. Then equation
$$ \frac{8x(x^2-1)}{(x^2+1)^2} = b $$
$$ \frac{8x^2(x-{1\over x})}{x^2(x+{1\over x})^2} = b $$
Mark $t =  x-{1\over x}$ and $t$ takes all real values. Then we have 
$$ b= \frac{8t}{t^2+4} $$ If $t$ is positive then $b\leq 2$ since $4t\leq t^2+4$ or $(t-2)^2\geq 0$ is true. If $t$ is negative then $b\geq -2$. So the range is $[-2,2]$ since $b(t)$ is continious function. 
A: $$f(x) = \frac{8x(x^2-1)}{(x^2+1)^2}={8(x^3-x)}{(x^2+1)^{-2}}\\f'(x)=8\left(\left(x^3-x\right)\left(-\dfrac{4x}{\left(x^2+1\right)^3}\right)+\left(3x^2-1\right){(x^2+1)^{-2}}\right)\\=
8\left(-\dfrac{4x^4-4x^2}{\left(x^2+1\right)^3}+\frac{3x^2-1}{(x^2+1)^{2}}\right)
\\=
8\left(\dfrac{4x^2-4x^4}{\left(x^2+1\right)^3}+\frac{(3x^2-1)(x^2+1)}{(x^2+1)^{2}(x^2+1)}\right)
\\=
8\left(\dfrac{4x^2-4x^4+(3x^2-1)(x^2+1)}{\left(x^2+1\right)^3}\right)
\\=
\frac{-8 (x^4 - 6 x^2 + 1)}{(x^2 + 1)^3}$$
now just solve for $0=x^4 - 6 x^2 + 1$
$$0=x^4 - 6 x^2 + 1,u=x^2\\0=u^2-6u+1\\u_{1,2}={\frac  {6\pm {\sqrt  {36-4\ }}}{2}}=\begin{cases}3+2\sqrt2\\3-2\sqrt2\end{cases}$$
so you get $4$ answers:$$x_{1,2,3,4}=\begin{cases}\sqrt{3+2\sqrt2}&=&1+\sqrt2\\[2ex]
-\sqrt{3+2\sqrt2}&=&-1-\sqrt2\\[2ex]
\sqrt{3-2\sqrt2}&=&\sqrt2-1\\[2ex]
-\sqrt{3-2\sqrt2}&=&1-\sqrt2\end{cases}$$
