<s>[INST] If $x^3-\frac1{x^3}=108+76\sqrt2$, find $x-\frac1x$ 
If $x^3-\frac1{x^3}=108+76\sqrt2$, find $x-\frac1x$

LHS = $(x-\frac1x)(x^2+\frac1{x^2}+1)=(x-\frac1x)((x-\frac1x)^2+3)$
Now, maybe RHS needs to be factorized so that some comparisons can be made, but not able to do so.
Or maybe LHS can be written as $(x-\frac1x)^3+3(x-\frac1x)$. Now, RHS can be broken down into two terms. One could be the cube of one third of the other term, but not able to do this either.
Any ideas how to approach such questions?
 [/INST] let $z = x - x^{-1}$; then we seek a "nice" solution of the form $z = a + b \sqrt{2}$ such that $z^3 + 3z = 108 + 76 \sqrt{2}$.  This in turn implies $$a(3 + a^2 + 6b^2) = 108, \\ b(3 + 3a^2 + 2b^2) = 76.$$  If $a, b$ are integers, then we must have $a \in \{1, 2, 3, 4, 6, 9, 12, 18, 27, 36, 54, 108\}$ and $b \in \{1, 2, 4, 19, 38, 76\}$ but clearly we can eliminate most of these possibilities, for if $a > 108^{1/3} > 4$ or $b > 38^{1/3} > 3$ neither equation can be met.  This leaves easy casework to check, and we find that $a = 3, b = 2$ works, hence $z = 3 + 2\sqrt{2}$.
</s>