Find $a$, $b$ such that $x^2 - x -1$ is a factor of $ax^9 + bx^8 + 1$ 
Find $a$, $b$ such that $x^2 - x -1$ is a factor of $ax^9 + bx^8 + 1$

The second polynomial can be rewritten as
$$ax^9 + bx^8 + 1 = f(x)(x^2 - x - 1)$$
The roots of this polynomial are $\frac{1 \pm \sqrt 5}{2}$. Substituting one of these roots in this equation gives us:
$$a\left( \frac{1 + \sqrt5}{2}\right)^9 + b\left( \frac{1 + \sqrt 5}{2}\right)^8 + 1 = 0$$
I was able to solve this far, but I gave up because the calculation past this point gets too tedious. The textbook has gone ahead and simplified this to
$$2^9 a + 2^8b(\sqrt 5 - 1) + (\sqrt5 - 1)^9 = 0$$
after which it simplifies to (divide by $2^8$ and solve the binomial expression)
$$2a + b(\sqrt 5 -1) = 76 - 34\sqrt5$$
Is there a more elegant way to solve this problem? Preferably one that does not include the magical use of a calculator or the evaluation of that ugly binomial expansion?

Say $c$ and $d$ are zeroes of $x^2-x-1$ then they are zeros of  $ax^9+bx^8+1$ too.
Since $c^2 = c+1$ we have $$c^4=c^2+2c+1=3c+2$$ and $$c^8 = 9c^2+12c+4 = 21c+13$$
and finnaly $c^9 = 34c+21$.
So we have $$a(34c+21)+b(21c+13)+1=0$$ or $$\boxed{(34a+21b)c+ (21a+13b+1)=0}$$
Simmilay we have for $d$: $$\boxed{(34a+21b)d+ (21a+13b+1)=0}$$
so if we substract equation and since $c\ne d$ we have $$(34a+21b)(c-d) = 0\implies 34a+21b=0$$
and thus $$21a+13b+1=0$$
Now solve this system and you are done.
