ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 27 Feb 2019 12:54:31 -0600Class returning coordinates of iteration maps in a dynamical systemhttp://ask.sagemath.org/question/45554/class-returning-coordinates-of-iteration-maps-in-a-dynamical-system/Hi, I'm using sage to study certain rational maps in $1$ dimensional projective space. Specifically I'd like to calculate coordinate maps of $n$-th iteration. I know that there are nth_iterate and nth_iterate_map classes but it seems that nth_iterate class only works on specific points and nth_iterate_map class returns the whole dynamical system, not the coordinate maps. For example, if we define
> sage: P.<x,y>=ProjectiveSpace(QQ,1); f=DynamicalSystem([x^2,y^2],domain=P)
then
> sage: f.nth_iterate(P[x,y],2)
gives an error that it is unable to convert x to an element of Algebraic Field, and
> sage: f.nth_iterate_map(2)
gives a dynamical system as follows.
> Dynamical System of Projective Space of dimension 1 over Algebraic Field
> Defn: Defined on coordinates by sending (x : y) to
> (x^4 : y^4)
What I want is a class, or any method, that returns coordinate maps, probably as a list of maps in $x$ and $y$, of $n$-th iteration. In the previous example, it should return a list $[x^4,y^4]$.
Any help will be appreciated. Thanks in advance!Tue, 26 Feb 2019 12:19:20 -0600http://ask.sagemath.org/question/45554/class-returning-coordinates-of-iteration-maps-in-a-dynamical-system/Answer by rburing for <p>Hi, I'm using sage to study certain rational maps in $1$ dimensional projective space. Specifically I'd like to calculate coordinate maps of $n$-th iteration. I know that there are nth_iterate and nth_iterate_map classes but it seems that nth_iterate class only works on specific points and nth_iterate_map class returns the whole dynamical system, not the coordinate maps. For example, if we define</p>
<blockquote>
<p>sage: P.<x,y>=ProjectiveSpace(QQ,1); f=DynamicalSystem([x^2,y^2],domain=P)</p>
</blockquote>
<p>then</p>
<blockquote>
<p>sage: f.nth_iterate(P[x,y],2)</p>
</blockquote>
<p>gives an error that it is unable to convert x to an element of Algebraic Field, and</p>
<blockquote>
<p>sage: f.nth_iterate_map(2)</p>
</blockquote>
<p>gives a dynamical system as follows.</p>
<blockquote>
<p>Dynamical System of Projective Space of dimension 1 over Algebraic Field
Defn: Defined on coordinates by sending (x : y) to
(x^4 : y^4)</p>
</blockquote>
<p>What I want is a class, or any method, that returns coordinate maps, probably as a list of maps in $x$ and $y$, of $n$-th iteration. In the previous example, it should return a list $[x^4,y^4]$.
Any help will be appreciated. Thanks in advance!</p>
http://ask.sagemath.org/question/45554/class-returning-coordinates-of-iteration-maps-in-a-dynamical-system/?answer=45563#post-id-45563You can achieve this by
sage: f.nth_iterate_map(2).defining_polynomials()
(x^4, y^4)
As a general tip, if you have an object that you want to get information out of, try assigning it to a variable e.g.
f2 = f.nth_iterate_map(2)
and then type `f2.<TAB>`; this will suggest a list of methods.Wed, 27 Feb 2019 12:54:31 -0600http://ask.sagemath.org/question/45554/class-returning-coordinates-of-iteration-maps-in-a-dynamical-system/?answer=45563#post-id-45563