<s>[INST] Stationary points of a cubic function If t is a positive constant, find the local maximum and minimum values of the function
$f(x) = (3x^2 - 4)\left(x - t + \frac{1}{t}\right)$
and show that the difference between them is $\frac{4}{9}(t + 1/t)^3$.
Find the least value of this difference as $t$ is varied.
My attempt:
\begin{align*}
f(x) & = (3x^2 - 4)\left(x - t + \frac{1}{t}\right)\\
f'(x) & = (3x^2 - 4)(1) + 6x\left(x - t + \frac{1}{t}\right)\\
\end{align*}
Stationary points when $f'(x) = 0$.
$$0 = 9x^2 - 6x\left(t - \frac{1}{t}\right) - 4$$
Find values for $x$ using quadratic formula gives
$$x = \frac{\left(t - \frac{1}{t}\right) \pm \sqrt{t^2 + \frac{1}{t^2}}}{3}$$
I am not sure if this is right so far, but if it is ... it seems very complicated to work out corresponding values for $f(x)$ and then find the difference between them.
 [/INST] Note that you can factor the derivative as
$$ \frac{\rm d}{{\rm d}x} f = \tfrac{1}{t} ( 3x -2 t) ( 3 t x + 2) = 0 $$
which gives you the $x$ values for the extrema
$$ \begin{gathered} x = \frac{2 t}{3} & x = -\frac{2}{3 t} \end{gathered} $$
For the next part, you can do a variable substitution with $ u = t + \frac{1}{t}$ since the answer you are looking for is in terms of $u$.
$$ f = (x - \sqrt{ u^2-4}) ( 3 x^2 - 4) $$
and
$$ \begin{gathered} x = \frac{\sqrt{u^2-4}-u}{3} & x = \frac{\sqrt{u^2-4}+u}{3} \end{gathered} $$
At this point plug in the extrema $x$ into $f$ and simplify. Take the difference between the two results.
</s>