The question is that: Given that $x^2 -5x -1991 = 0$, what is the solution of $\frac{(x-2)^4 + (x-1)^2 - 1}{(x-1)(x-2)}$
I've tried to factorize the second polynomial like this: $\frac{(x-2)^4 + (x-1)^2 - 1}{(x-1)(x-2)} =\frac{(x-2)^4+x(x-2)}{(x-1)(x-2)} =\frac{(x-2)((x-2)^3+x)}{(x-1)(x-2)}=\frac{(x-2)^3+x}{(x-1)}$
However I could not solve it with the given equation $x^2 -5x -1991 = 0$. I know that direct substitution may work, but I think that there is a neat solution to this polynomial. Thanks in advance!
Edited: I've found the way to solve it with the help of lhf
$\frac{(x-2)^4+(x-1)^2-1}{(x-1)(x-2)}=\frac{((x-2)^2+1)((x-2)^2-1)+(x-1)^2}{(x-1)(x-2)}=\frac{(x^2-4x+5)(x-1)(x-3)+(x-1)^2}{(x-1)(x-2)}=\frac{(x^2-4x+5)(x-3)+x-1}{(x-2)}=\frac{(x^2-4x+5)(x-2)-x^2+4x-5+x-1}{(x-2)}=\frac{(x^2-4x+5)(x-2)-(x-2)(x-3)}{(x-2)}=x^2-5x+8$
Hint: $\dfrac{(x-2)^4 + (x-1)^2 - 1}{(x-1)(x-2)}$ simplifies to $x^2 - 5 x + 8$