<s>[INST] Reducing $ax^6-x^5+x^4+x^3-2x^2+1=0$ to a cubic equation using algebraic substitutions 
Use algebraic substitutions and reduce the sextic equation to the cubic equation, where $a$ is a real number:
$$ax^6-x^5+x^4+x^3-2x^2+1=0$$

My attempts.
First, I tried to use the Rational root theorem, when $a$ is an integer $x=\pm 1$, but this implies $a=0$ and this is not always correct. Then I realized that,
$$x^4-2x^2+1=(x^2-1)^2$$
is a perfect square. So, I tried to write the original equation as
$$ax^4-x^3+x+\bigg(x-\frac 1x\bigg)^2=0$$
$$x^2\bigg(ax^2-x+\frac 1x\bigg)+\bigg(x-\frac 1x\bigg)^2=0$$
But I failed again. I couldn't spot the palindromic property.
 [/INST] Define $t,u=\frac{1\pm\sqrt{1-4a}}{2a}$ as the roots of $ax^2-x+1$. Then the sextic splits into two cubics over $\mathbb Q(t)$:
$$ax^6-x^5+x^4+x^3-2x^2+1=a(x^3-tx^2+t)(x^3-ux^2+u)$$
This can be verified by re-expanding. Here the substitution is $a=\frac{t-1}{t^2}$ and not in $x$.
</s>