Solve non-linear recurrence

79 Views Asked by At

I am trying to solve the following recurrence (i.e. determine $a_n$). I'm not entirely sure how to proceed, I have only encountered linear ones so far. This is not a homework, I'm just doing it for fun.

$$a_{n+1}+\frac{1}{a_n}=2$$

1

There are 1 best solutions below

2
On

It is fairly straightforward to prove by induction that $a_n=\frac{na_1-(n-1)}{(n-1)a_1-(n-2)}$ for $n \geq 1$.

Edit: To get the pattern, one can play around with the first few terms, so $a_2=2-\frac{1}{a_1}=\frac{2a_1-1}{a_1}$, then $a_3=2-\frac{1}{a_2}=2-\frac{a_1}{2a_1-1}=\frac{3a_1-2}{2a_1-1}$, then $a_4=2-\frac{1}{a_3}=2-\frac{2a_1-1}{3a_1-2}=\frac{4a_1-3}{3a_1-2}$. After a while, the pattern shows itself, and is then easily proven by induction.