rho : 0.7883464276266063*%i - 0.6152315905806267;
f(z):= float(rectform((rho * z^2 * (z-3)/(1-3*z))))$
there are 3 basins
* basin of z=0 ( easy) with critical point z=0
* basin of infinity ( easy)
* basin of parabolic period 3 cycle ( hard), with critical point z=1
I found 2 period 3 cycles :
* cycle1; [-0.679019512966907,0.7341202224500998], [0.836586884826584,0.5478342670335168], [-0.5274543103865239,-0.849583398175056],
* cycle2; [[0.7032040964766633,0.7109880439912073], [-0.3910900888807991,-0.9203524011916365], [-0.7533753580242582,0.6575907313229275]
both cycles are on unit circle.
Critical point z=1 seems to land on cycle1.
I can't compute multiplier in Maxima ( long expression)
kill(all);
display2d:false;
ratprint : false; /* remove "rat :replaced " */
/* f(z) is used as a global function
I do not know how to put it as a argument */
GiveOrbit(z0,OrbitLength):=
block(
[z,Orbit],
z:z0,
Orbit:[z],
for i:1 thru OrbitLength step 1 do
( z:expand(f(z)),
if cabs(z) > 2 then
( print(z0), print("orbit of is escaping"),
return(Orbit)),
Orbit:endcons(z ,Orbit)
),
print(z0), print("orbit is not escaping"),
return(Orbit)
)$
/* give Draw List from one point*/
/*
converts complex number z = x*y*%i
to the list in a draw format:
[x,y]
*/
d(z):=[float(realpart(z)), float(imagpart(z))]$
ToPoints(myList):= points(map(d,myList))$
rho : 0.7883464276266063*%i - 0.6152315905806267;
f(z):= float(rectform((rho * z^2 * (z-3)/(1-3*z))))$
iLength:10000;
Orbit: GiveOrbit(1.0,iLength)$
/* period 3 points */
e: f(f(f(z))) = z$
load (to_poly_solve);
s: to_poly_solve (e,z);
s: args(s); /* https://stackoverflow.com/questions/12834709/create-a-union-into-a-list-in-maxima */
s:flatten(s);
s:map(rhs,s);
r:[];
for z in s do if (abs(abs(z) -1) < 0.001) then r:cons(z,r);
cycle1:[];
z:r[1];
cycle1: cons(z, cycle1);
for i:1 thru 3 step 1 do (
z:float(rectform(f(z))),
cycle1:cons(z, cycle1)
);
cycle2:[];
z:r[2];
cycle2: cons(z, cycle2);
for i:1 thru 3 step 1 do (
z:float(rectform(f(z))),
cycle2:cons(z, cycle2)
);
Orbit : ToPoints(Orbit)$
r:ToPoints(r)$
cycle1 : ToPoints(cycle1)$
cycle2 : ToPoints(cycle2)$
load(draw); /* ( interface to gnuplot ) by Mario Rodriguez Riotorto http://www.telefonica.net/web2/biomates */
draw2d(
title = "Two period 3 orbits for f(z)= rho * z^2 * (z-3)/(1-3*z))",
terminal = png,
user_preamble = "set size square; set key right top;", /* 360/26=13.85 ; 360/(2*26)=6,923 */
file_name = concat("~/Dokumenty/julia_blaszke/period3/maxima/roots/", concat("cycles_",string(iLength))),
dimensions = [600, 600], /* Since Maxima 5.23, pic_width and pic_height are deprecated. */
/*
yrange = [-1.0,1.0],
xrange = [-1.0,1.0],
*/
xlabel = "z.re ",
ylabel = "z.im",
line_width = 1,
nticks = 50,
color = gray,
transparent = true,
ellipse(0,0,1,1,0,360), /* unit circle */
point_type = filled_circle,
point_size = 0.9,
key="critical orbit ",
color = black ,
Orbit,
point_size = 1.2,
key="critical point",
color = blue ,
points([[1,0]]),
point_type = filled_circle,
points_joined = true,
point_size = 0.9,
key="cycle 1",
color = red ,
cycle1,
point_type = filled_circle,
points_joined = true,
point_size = 0.9,
key="cycle 2",
color = blue ,
cycle2
);