If $x+\frac1x=5$ find $x^5+\frac1{x^5}$.

Observe the recurrence relation $$x^{n+1} + x^{-(n+1)} = (x+x^{-1})(x^n+x^{-n}) - (x^{n-1} + x^{-(n-1)}).$$

This immediately gives us the specific recurrence $$f_{n+1} = 5f_n - f_{n-1}, \quad f_0 = 2, \quad f_1 = 5,$$ where $f_n = x^n + x^{-n}$.


\begin{align} x+\frac{1}{x}&=5\\ x^2+1&=5x\\ x^2-5x+1&=0\\ x &=\frac{1}{2} \left( 5 +\sqrt{21}\right)\\ x^5+\frac{1}{x^5}&=\cdots \end{align}


Using the factorization identity $$a^5+b^5=(a+b)(a^4-a^3b+a^2b^2-ab^3+b^4),$$ we obtain \begin{align} x^5+\frac{1}{x^5}&=\left(x+\frac{1}{x}\right)\left(x^4-x^2+1-\frac{1}{x^2}+\frac{1}{x^4}\right) \\ &=\left(x+\frac{1}{x}\right)\left(\left(x+\frac{1}{x}\right)^4-5x^2-5-5\frac{1}{x^2}\right) \\&=\left(x+\frac{1}{x}\right)\left(\left(x+\frac{1}{x}\right)^4 -5\left(x+\frac{1}{x}\right)^2+5\right)=5(5^4-5\cdot5^2+5)=2525, \end{align} since $$ \left(x+\frac{1}{x}\right)^4=x^4+4x^2+6+\frac{4}{x^2}+\frac{1}{x^4}. $$