I'm trying to compute the critical point portrait of a map and plot the 
resulting object as a digraph, but I'm having trouble using QQbar elements.

Here is an explicit example

R.<x>=PolynomialRing(QQbar)
w=(x^2+3).roots()[0][0]
R.<b>=PolynomialRing(QQbar)
B=(b^8 + 327680*b^6 - 1529008357376*b^4 + 
607985949695016960*b^2+95627921278110315577344).roots()[0][0]
b=B/1024
a=-(-1/415051741658464911360*w*B^7 - 1/1266637395197952*w*B^5 + 
77/24159191040*w*B^3 - 7/3072*w*B)
f=x^3+a^2*x + b
CP=(f.derivative()).roots(ring=QQbar)
D={}
P=CP[0][0]
P2=f(P)
P3=f(P2)
P4=f(P3)
P4==P2  #Line 1
Q=CP[1][0]
Q2=f(Q)
D.update({P:[P2]})
D.update({P2:[P3]})
D.update({P3:[P4]})  #Line 2
D.update({Q:[Q2]})
D.update({Q2:[f(Q2)]})
g=DiGraph(D,loops=True)
g.plot()


This basically doesn't work.
1) If line 1 is removed, then line 2 takes a very long time (if it ever 
finishes)
2) it can produce g with what seems to be the correct structure, but 
plotting takes a very long time (if it ever finishes)


What can I do differently to get this to work?

Thanks,
  Bem

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to