TITLE: Interesting question about finding a quadratic polynomial such that $h(\alpha)=\beta, \ h(\beta)=\gamma, \ h(\gamma)=\alpha$
QUESTION [5 upvotes]: $f(x)=x^3-3x^2+1, \forall x\in\mathbb R$,
$g(x)=1-\frac{1}{x} ,\forall x\in\mathbb R, x \neq 0$.
i) Show that $f(x)$ has $3$ distinct and real roots.
ii) It is given $\gamma < \beta < \alpha$, where $\gamma, \alpha, \beta$ are the roots of $f(x)$. Show that $g(\alpha)=\beta, \ g(\beta)=\gamma, \ g(\gamma)=\alpha$.
iii) Given $h(x)$ is a quadratic function such that $h(\alpha)=\beta, \ h(\beta)=\gamma, \ h(\gamma)=\alpha$.

Part (i) and (ii) are quite easy to show.
(i):
\begin{align} D(f)&=−27^2^2+18−4^3−4^3+^2^2 \\
&=-27(1)(1)-4(-3^3)(1)>0. 
\end{align}

(ii): $g'(x)=\frac{1}{x^2} \implies g(x)$ is strictly increasing from the interval $(-\infty, 0)$ & $(0, \infty)$. We also know that $f(g(\alpha))=f(\beta)=0$. Similarly for $g(\beta)$ & $g(\gamma)$. So  $g(\beta), g(\gamma), g(\alpha)$ are roots to $f(x)$.
Consider $g(\gamma)$ which now can either equal $\alpha, \beta$ or $\gamma$. Since the function is strictly increasing and not monotonically increasing, we conclude $g(\gamma) \neq \gamma$.
So $g(\alpha)=\gamma,  \beta$ |$g(\beta)=\alpha, \gamma$ | $g(\gamma)=\alpha, \beta$. We use the fact that $g(x)$ is one to one to conclude that $g(\gamma) \neq g(\alpha)$. Thus only one of these 2 possible solutions are true. Suppose $g(\alpha)=\gamma$, $g(\beta)=\alpha$, $g(\gamma)=\beta$. Since  $g(x)$ is strictly increasing, then it implies that one of the roots must lie within the negative interval and that root is $\gamma$. We can show then that $\beta>1$ which would make $\alpha<1$, which is a contradiction, so the other possibility must be true, proving $g(\alpha)=\beta, \ g(\beta)=\gamma, \ g(\gamma)=\alpha$.

(iii): This part is the part I'm stuck at. This is what I've tried.
$f(g(x))= -\frac{1}{x^3}+3(\frac{1}{x})-1$. So if $g(\alpha)$ is a root to $f(x)$, it implies $\frac{1}{\alpha}$ is a root for $x^3-3x+1=0$.
$\gamma=\frac{1}{1-\alpha}, \beta=\frac{1}{1-\gamma}, \alpha=\frac{1}{1-\beta}$.
$g^2(x)=\frac{1}{1-x}$ which potentially could be easier to work with.
That the distance between the roots can be modelled by the distance between the $g(x)$ and $g^2(x)$ graphs. The coloured segments are lines of the same length:

That the following are true:
$$(\alpha - \beta)(\gamma) = \gamma - \beta$$
$$(\alpha - \gamma)(\beta) = \alpha - \beta$$
$$(\beta - \gamma)(\alpha) = \alpha - \gamma$$
But after this I'm stuck. How can I proceed?

REPLY [3 votes]: The traditional thing is this:  take three distinct real numbers $u,v,w$ so the pairwise differences are nonzero. To get a quadratic $q(x)$ that gives $q_u(u) =1$ while $q_u(v)=q_u(w) = 0.$ 
$$ q_u(x) = \frac{(x-v)(x-w)}{(u-v)(u-w)}  $$ 
Back to your $\alpha, \beta, \gamma$ do the same and make
$$ \beta q_\alpha + \gamma q_\beta + \alpha q_\gamma $$
I'm not sure what these are called, but one can always arrange such "indicator" functions: given distinct numbers $x_1, x_2, ..., x_n$ we can make a polynomial function $f_1(x_1) = 1,$ $f_1(x_2) = 0,$ $f_1(x_3) = 0,$ and so on, where the degree of each $f_i$ is $n-1.$ 
Alright,  Matthew points out that these are called Lagrange Polynomials, https://en.wikipedia.org/wiki/Lagrange_polynomial