ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 25 Nov 2012 01:01:40 +0100How to find limit of a recursive sequence?https://ask.sagemath.org/question/9562/how-to-find-limit-of-a-recursive-sequence/For example, I have this sequence:
f(0) = 1
f(n) = 1/5 * (f(n-1)^2 + f(n-1) + 3)
How do I find the limit of this sequence? I have been searching for how to do this for a while, but I can't find the answer.Sat, 24 Nov 2012 23:57:16 +0100https://ask.sagemath.org/question/9562/how-to-find-limit-of-a-recursive-sequence/Answer by achrzesz for <p>For example, I have this sequence:
f(0) = 1
f(n) = 1/5 * (f(n-1)^2 + f(n-1) + 3)
How do I find the limit of this sequence? I have been searching for how to do this for a while, but I can't find the answer.</p>
https://ask.sagemath.org/question/9562/how-to-find-limit-of-a-recursive-sequence/?answer=14295#post-id-14295In your example all f(n) are equal to 1, so the limit is 1 :)
In the case of linear recursive definitions you can use rsolve from sympy or solve_rec from Maxima, and then use limit function. In the general nonlinear case you can experiment numerically: http://ask.sagemath.org/question/1247/how-to-define-a-recursive-sequence-on-sage.
Using Maxima you can do:
sage: maxima('f[n]:=1/5*(f[n-1]^2+f[n-1]+3)')
f[n]:=(3+f[n-1]+f[n-1]^2)/5
sage: maxima('f[0]:1')
1
sage: maxima('f[100]')
1
Sun, 25 Nov 2012 01:01:40 +0100https://ask.sagemath.org/question/9562/how-to-find-limit-of-a-recursive-sequence/?answer=14295#post-id-14295