2
$\begingroup$

I have come across a few different questions relating to my issue (namely this one, but the answers are not working for me. Here are my inputs;

{Slider[Dynamic[c], {0, 2}], Dynamic[c]}
Dynamic[RecurrenceTable[{a[n + 1] == (c + a[n]^2)/2, a[1] == c/2},a, {n, 1, 20}]]
Dynamic[ListPlot[RecurrenceTable[{a[n + 1] == (c + a[n]^2)/2, a[1] == c/2},a, {n, 1, 20}]]]

These work so far and are just to help me visualize the sequence and its values. Then I try

Dynamic[RSolveValue[{a[n + 1] == (c + a[n]^2)/2, a[1] == c/2}, a[Infinity], n]]
(* RSolveValue[{a[1+n]==1/2 (0.715 +a[n]^2),a[1]==0.3575},a[\[Infinity]],n] *)

And I can't seem to get it to output the limit (when one exists, namely when c is less than or equal to 1). I've tried a couple of the different solutions from that thread but I can't get it to work. Most of the time it just reprints my input like the above. I'm trying to avoid defining my function because then I have to shift the index (n+1 to n), which I don't want to make a habit of.

I'm new to Mathematica so my apologies for any mistakes. Is there a way to get this thing to give me the limit or let me know if it doesn't exist?

$\endgroup$
2
  • $\begingroup$ As with tghe prior post, you can get a finite list of candidates by solving a quadratic (in this case) like so. In[919]:= Solve[ainf == (c + ainf^2)/2, ainf] Out[919]= {{ainf -> 1 - Sqrt[1 - c]}, {ainf -> 1 + Sqrt[1 - c]}}. It is not difficult to reason by induction that the first is the correct limit: c<=1 by assumption, so a[1]<=1/2 and for all n, a[n+1]<=1/2+a[n]^2/2<1/2+1/2. $\endgroup$ Dec 12, 2023 at 17:03
  • $\begingroup$ I should add that my reasoning about convergence only applies for -1<=c<=1. For values where c<-1 some experimenting indicates we have limit cycles. $\endgroup$ Dec 12, 2023 at 21:05

3 Answers 3

4
$\begingroup$

Your problem is that Infinity is not a number. But you may choose a large number and calculate a[n] for e.g. 1000 and 10000 and check if they are the same.

E.g. you may write:

Dynamic[RSolveValue[{a[n + 1] == (c + a[n]^2)/2, a[1] == cc/2},  a[1000], n]]
Dynamic[RSolveValue[{a[n + 1] == (c + a[n]^2)/2, a[1] == cc/2}, a[10000], n]]

Then you get:

enter image description here

$\endgroup$
2
  • $\begingroup$ I see! I'm guessing then that RSolveValue can only take in finite values? To that end, may I ask; would there be a way to use Limit[] and have n -> Infinity? Choosing a large number manually might leave some room for human (my) error. Additionally, it'd be more comforting to have the function tell me explicitly "There is a limit; this" or "There is no limit". $\endgroup$
    – ant
    Dec 12, 2023 at 11:09
  • $\begingroup$ I haver no proof, but I think that "Limit" tries to get a symbolic solution and fails for this non linear recursion equation. $\endgroup$ Dec 12, 2023 at 13:13
4
$\begingroup$

Another approach is to look for stable points of the iteration. For example:

Solve[astar == (c + astar^2)/2, astar]

{{astar -> 1 - Sqrt[1 - c]}, {astar -> 1 + Sqrt[1 - c]}}

So these two values 1+/-Sqrt[c] are the only candidates for stable points. If you linearize, you find

D[(c + astar^2)/2, astar]
astar

So only the first of the these (with the minus sign) is a stable equilibrium (assuming 1>c>0).

$\endgroup$
3
$\begingroup$

The OP question is more appropriate for math.stackexchange.com but the limit seems to be 1 - Sqrt[1 - c] for -3<=c<=1.

a1 can be 0 instead of c/2 since it only shifts the sequence by one position.

$$\left\{-3\leq c\leq 1,a_1=0,a_{n+1}=\frac{a_n^2+c}{2},\underset{n\to \infty }{\text{lim}}a_n=1-\sqrt{1-c}\right\}$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.