# Stable/unstable algorithm

whattttt
Can anyone help in provong whether or not the algorithm

r_n+1= r_n/1+sqrt(2-r_n)

is stable. I have tried using error analysis but am struggling to get the algorithm in a form that can be easily dealt with. Thanks in advance

Mentor
Can anyone help in provong whether or not the algorithm

r_n+1= r_n/1+sqrt(2-r_n)

is stable. I have tried using error analysis but am struggling to get the algorithm in a form that can be easily dealt with. Thanks in advance
What have you tried?

What is r0? Have you tried calculating a few terms in the sequence? That might give you some insight.

I'm guessing that this is your recursion equation:
$$r_{n + 1} = \frac{r_n}{1 + \sqrt{2 - r_n}}$$

If that is correct, your equation needs more parentheses, like this:
r_n+1= r_n/(1+sqrt(2-r_n))