Given that $x+\frac{1}{x}=\sqrt{3}$, find $x^{18}+x^{24}$
As $x\ne0,$ on simplification we find $$x^2+1=\sqrt3x$$
Squaring we get $$x^4+2x^2+1=3x^2\iff x^4-x^2+1=0$$
Now $$ x^6+1=(x^2+1)(x^4-x^2+1)$$
Solving for $$x^2-\sqrt3x+1=0,$$
$$x=\dfrac{\sqrt3\pm i}2=\cos\dfrac\pi6\pm i\sin\dfrac\pi6=e^{\pm i\pi/6}$$
$$\implies x^6=e^{\pm i\pi}=-1$$
Another way:
$$x^{18} + x^{24} = x^{21} (x^3 + \frac{1}{x^3})\\ = x^{21} ((x+\frac{1}{x})^3 - 3(x+\frac{1}{x}))\\ = x^{21}(3\sqrt{3} - 3\sqrt{3}) = 0. $$