nom, date
(1) titre
(2) save
(3) rappel : print .... utiliser preview
>
Itérations : Rappel des épisodes précédents
> (1- z)/(z+2): f:= unapply(%, z);
> pl1:= plot(f(t), t=-10..10):
> pl2:= plot(t, t=-10..10, color=blue):
> x0:= -3.15; li:= seq( (f@@k)(x0), k=0..15);
> pl3:= plots[pointplot]([ li[1]$3, seq(k$4, k=li[2..-2]), li[-1]$3 ], style=line, color=green):
> a,b:= -10,4; display(pl1, pl2,pl3, view=[a..b, a..b], scaling=constrained);
>
Itérateur
> Z=f(z); solve(%, z); g:= unapply(%,Z);
Ecrire par morceaux
>
it:= proc(z,n)
end;
Il faut des return
>
it1:= proc(z,n)
if n=0 then return z
elif n>0 then return (f@@n)(z)
elif n<0 then return (g@@(-n))(z)
fi;
end;
> li;
> it1(x0, 0); it1(x0,2); it1(%, -2);
Traiter les cas indéterminés
> it1(x0, m);
Error, (in it1) cannot evaluate boolean: -m < 0
>
it2:= proc(z,n) ;
if not type(n, numeric) then return 'it'(z,n)
elif n=0 then return z
elif n>0 then return (f@@n)(z)
elif n<0 then return (g@@(-n))(z)
fi;
end: it2(x0, m);
Empecher les cas stupides
> it2(x0, 1.5);
Error, (in @@) invalid arguments
>
it3:= proc(z,n) ;
if not type(n, numeric) then return 'it'(z,n)
elif n=0 then return z
elif n>0 then return (f@@n)(z)
elif n<0 then return (g@@(-n))(z)
fi;
end: it3(x0, m); map(it3, [1,2,3], 4); map2(it3, x0, [0,2,-2,m]);
>
it4:= proc(z, n::{integer, symbol}) ;
if not type(n, numeric) then return 'it'(z,n)
elif n=0 then return z
elif n>0 then return (f@@n)(z)
elif n<0 then return (g@@(-n))(z)
fi;
end: it4(x0, m); it4(x0,-2); it4(x0, 1.5);
Error, it4 expects its 2nd argument, n, to be of type {integer, symbol}, but received 1.5
>
Points fixes
> alpha, beta:= solve(f(z)=z);
> fsolve(f(z)=z); fsolve(f(z)=z, z=-5..0);
> ka, kb:= D(f)(alpha), D(f)(beta);
> rationalize(ka);
> ka, kb:= (rationalize@D(f))(alpha), (rationalize@D(f))(beta);
Pourquoi sont-ils inverses ?
> expand(ka*kb);
Et alors ?
> evalf(ka), evalf(kb);
>
Transformation
> (z-beta)/(z-alpha): phi:= unapply(%,z);
Trouver theta, la fonction réciproque
> solve(Z=phi(z), z); psi:= unapply(%,Z);
Diagramme commutatif
> (factor@expand@rationalize@normal@phi@f@psi)(Z);
Tiens, c'est le même nombre
>
Newton
> a:='a': (x+a/x)/2; new:= unapply(%,x);
> Digits:= 40; a:=3; seq((new@@k)(1.), k=0..8); Digits:=10;
A nouveau deux points fixes
> a:='a':so:= solve(new(x)=x, x);
Et alors ....
> (z-so[1])/(z-so[2]); phi:= unapply(%,z);
> Z= phi(new(zeta)), z= phi(zeta);
> solve({%}, {Z, zeta});
>
>
>
Quotients (z-a)/(z-b)
> h:= unapply((z-I)/(z-1), z);
si h(z) est connu
> h(z)= 3+I; solve(%, {z});
Si l'argument est connu
>
h(z)= k* exp(I*t); eq_z:= (solve)(%, z);
Tracer un lieu
> subs(t=Pi/4, eq_z); plots[complexplot](%, k=0..10, scaling=constrained);
En tracer plusieurs
seq(plots[complexplot](subs(t=j, eq_z) , k=0..10, scaling=constrained), t=[Pi/6, Pi/4, Pi/2, 2*Pi/3]):
pl1:= display(%, view=[-2..3,-2..3]): %;
En tracer plusieurs
seq(plots[complexplot](subs(t=j, eq_z) , k=0..10, color=blue), t=[Pi+Pi/6, Pi+Pi/4, Pi+Pi/2, Pi+2*Pi/3]):
pl2:= display(pl1,%, view=[-2..3,-2..3], scaling=constrained): %;
>
>
>
>
Si le module est connu
>
h(z)= k* exp(I*t); eq_z:= (solve)(%, z);
Tracer plusieurs lieux
> subs(k=2, eq_z); plots[complexplot](%, t=-Pi..Pi, scaling=constrained);
Puis expliquer
>
seq(plots[complexplot](subs(k=j, eq_z) , t=-Pi..Pi, color= black), j=[1/4,1/3,1/2,$1..4]):
display(pl2, %, view=[-2..3,-2..3], scaling=constrained);
>
>
>
>