How do you solve the following recurrence relationship?
$$x_{n} = \frac{x_{n-1}}{1 + x_{n-1}}$$
where
$$ x(0) = 1 $$
I know the answer is $$ x_n = \frac{1}{n+1}$$
I solved it by induction. But I don't like it that much since I always feel like I'm cheating when I solve by induction. I assume I already know the answer.
Is there a better way?
thanks
Using the hints in the comments, we let $y_n = 1/x_n$ so that $y_0 = 1/1 = 1$ and: $$ \frac{1}{y_n} = \frac{\frac{1}{y_{n-1}}}{1 + \frac{1}{y_{n-1}}} = \frac{1}{y_{n-1} + 1} $$ But by taking reciprocals of both sides, we obtain an easily solved linear recurrence relation: \begin{align*} y_n &= y_{n-1} + 1 \\ &= (y_{n-2} + 1) + 1 = y_{n-2} + 2 \\ &= (y_{n-3} + 1) + 2 = y_{n-3} + 3 \\ &= \cdots \\ &= y_0 + n = 1 + n &\text{using implicit induction} \end{align*} Hence, we conclude that $x_n = \frac{1}{1 + n}$.