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?

Put $A = x^2 - x - 1$, $B = ax^9 + bx^8 + 1$ now we want $B/A$ to divide without remainder. We can subtract multiples of $A$ from $B$ to kill off high order terms and see what the remainder would be:
B
- a*x^7*A
= (a + b)*x^8 + a*x^7 + 1

- (a + b)*x^6*A
(2*a + b)*x^7 + (a + b)*x^6 + 1

- (2*a + b)*x^5*A
(3*a + 2*b)*x^6 + (2*a + b)*x^5 + 1

We find
Q = a*x^7 + (a + b)*x^6 + (2*a + b)*x^5
  + (3*a+2*b)*x^4 + (5*a + 3*b)*x^3 + (8*a + 5*b)*x^2
  + (13*a + 8*b)*x + (21*a + 13*b)

R = (34*a + 21*b)*x + 21*a + 13*b + 1

via B - Q A = R

So we need to solve the system

*

*$34a + 21b = 0$

*$21a + 13b + 1 = 0$
To get no remainder.
