Mathematica Asked on July 12, 2021
Given a function f[{x,y}]
it is rather simple to use, for example, NSolve
to find periodic points of period $n$. We simply take something like
NSolve[f[f[f[{x, y}]]] == {x, y}, {x, y}]
to search for period three points. Is it possible to separate these solutions into periodic cycles? That is can I get as an output a list whose sublists are the fixed points, say $p1$ and $p2$ and the period 3 cycle, say $q1 to q2 to q3$?
So the required output would be {{p1}, {p2}, {q1, q2, q3}}
Edit:
Take for example g[{x_, y_}, -1, 0.2] := {x^2 + -1 - 0.2*y, x}
(written this way in case we would like to find periodic points for other parameters.)
The $n$-th iterate is given by gcomp[n_Integer, -1, 0.2] := Composition @@ ConstantArray[g[#, -1, 0.2] &, n];
and period $n$ points are given by
pernpts[n_, -1, 0.2] := Table[{x, y} /. Flatten[NSolve[gcomp[n, -1, 0.2][{x, y}] == {x, y}, {x, y}], {1}][[i]], {i, 1, Length[Flatten[NSolve[gcomp[n, -1, 0.2][{x, y}] == {x, y}, {x, y}], {1}]]}]
Here I have again fixed some parameter values but the hope is to be able to easily vary these. I have also adapted the code so it gives outputs as a pair of complex numbers rather than the usual display by NSolve
.
The period three points are
{{1.76619, 1.76619}, {-1.35603 + 0.124032 I, -0.0842516 - 0.441668 I}, {-1.35603 - 0.124032 I, -0.0842516 + 0.441668 I}, {-0.0842516 - 0.441668 I,0.84028 - 0.248049 I}, {-0.0842516 + 0.441668 I,0.84028 + 0.248049 I}, {-0.56619, -0.56619}, {0.84028 - 0.248049 I, -1.35603 + 0.124032 I}, {0.84028 + 0.248049 I, -1.35603 - 0.124032 I}}
and the fixed points are
{{1.76619, 1.76619}, {-0.56619, -0.56619}}
In this case it it easy to take out the fixed points and by hand we could assemble these period three points in cycles. The difficulty is that as the period increases this becomes more difficult. Also when our period $n$ is divisible by some number, say $d$, we get that periodic cycles of length $d$ are also periodic cycles of period $n$. An easy example of this is that a fixed point of $f$ is also a fixed point of any iterate of $f$ so a fixed point is a point of period $n$ for all $n$.
Update: In experiments with different parameter values for period 3 cycles there does seem to be some structure to the set of solutions which could possibly be used to provide this grouping. This could just be because I picked parameter values not too far away from each other though, so it’s unclear how this generalises. Also, we’d have to limit this to low periods, since, as a comment points out, we would require a lot of processing power to solve, e.g. period 6 and higher. Perhaps one could achieve the required grouping through list manipulation by taking an element, and iterating it up to the period required. Then removing these points from the solution set and carrying on until this is exhausted. This is perhaps easier than trying to get Mathematica to group them together automatically as an output. I have experimented with this but one problem is that Mathematica does not seem to handle Complement
well when applied to a list obtained by NSolve
(for example the complement of period 3 points and period 1 points).
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP