diff



Viktor T. Toth pisze:
>> Yes, coefficients are diffrent.
> 
> I think this is because in the recursion, you wrote this:
> 
> [...]   else f(F(n-1,c,z),c) [...]
> 
> when you actually meant this:
> 
> [...]   else f(F(n-1,z,c),c) [...]
> 
> 
> Viktor
> 

Thx for help.
It seems to work now :


===============code ===============
/*
* batch file for Maxima
* shows info for Fatou set for f(z)=z*z+c
* finds periodic points
*/

/* */
c:-1+0.0*%i$
/* n= period */
n:2$


/* definitions */
/* basic funtion */
f(z,c):=z*z+c$
/* */
/* iteration of function -  code by Robert Dodier */
F (n, z, c) := if integerp (n) then if n = 1 then f (z, c)
else f (F(n - 1, z, c), c) else 'F (n, z, c);

/* multiplier */
m (n, z, c) := at (diff (F (n, 'z, c), 'z), 'z = z);

/*   */
G(n,z,c):=F(n, z, c)-z$

/* stability index */
l(n,z):=abs(m(n,z,c))$

/* n-periodic points = fixed points of F (n, z, c) = roots of G(n,z,c) */
p:float(rectform(solve([G(n,z,c)], [z])))$
z1:rhs(p[1]);
z2:rhs(p[2]);
/* check stability of fixed points */
s1:l(n,z1);
s2:l(n,z2);