> restart:

TP 03

Itérations et points fixes

Rappel de consignes

(1) titre en "Times New Roman", corps 36,

NOM Prénom - groupe

tp03 - date

(2) sauvegarder "souvent"

(3) imprimer : paginer (Format/Page_Number)

puis File/Preview.

enfin imprimer en deux colonnes

>

Points fixes

> (1- z)/(z+2); whattype(%);

(1-z)/(z+2)

`*`

> (1- z)/(z+2): f:= unapply(%, z); whattype(%);

f := proc (z) options operator, arrow; (1-z)/(z+2) ...

procedure

> plot(f(t), t=-10..10);

[Maple Plot]

> plot(f(t), t=-10..10, view=[-10..10, -10..10],
discont= true, color=black, linestyle=16),
plot(t, t=-10..10): display(%); pl1:=%:

[Maple Plot]

> alpha, beta:= solve(f(z)=z);

alpha, beta := -3/2-1/2*sqrt(13), -3/2+1/2*sqrt(13)...

> fsolve(f(z)=z); fsolve(f(z)=z, z=-5..0);

.3027756377

-3.302775638

> ka, kb:= D(f)(alpha), D(f)(beta);

ka, kb := -1/(1/2-1/2*sqrt(13))-(5/2+1/2*sqrt(13))/...

> rationalize(ka);

-7/6-1/6*sqrt(13)

> ka, kb:= (rationalize@D(f))(alpha), (rationalize@D(f))(beta);

ka, kb := -7/6-1/6*sqrt(13), -7/6+1/6*sqrt(13)

Ils sont inverses :

> expand(ka*kb);

1

Pourquoi donc ?

>

>

Tracé de l'escargot

> x0:= -1.; li:= seq( (f@@k)(x0), k= 0..5);

x0 := -1.

li := -1., 2.000000000, -.2500000000, .7142857143, ...

> plots[pointplot]([[-1,-1], [-1,2], [2,2]], style=line, color=green);

[Maple Plot]

> plots[pointplot]([-1,-1,-1,2,2,2], style=line, color=green);

[Maple Plot]

> plots[pointplot]([-1$3,2$4,-0.25$4,.714 $3], style=line, color=green):
display(%, pl1);

[Maple Plot]

Opérateur de répétition

> 3 $ 4; x$ 5;

3, 3, 3, 3

x, x, x, x, x

Adressage dans une liste

> li;
li[1]; li[2..3]; li[-2];

-1., 2.000000000, -.2500000000, .7142857143, .10526...

-1.

2.000000000, -.2500000000

.1052631579

> suite:= li[1]$3, seq(X$4, X= li[2..-2]), li[-1]$3 ;

> pl3:= plots[pointplot]([suite ], style=line, color=green):

suite := -1., -1., -1., 2.000000000, 2.000000000, 2...
suite := -1., -1., -1., 2.000000000, 2.000000000, 2...
suite := -1., -1., -1., 2.000000000, 2.000000000, 2...

> display(pl1, pl3, view=[-1..3, -1..2.5], scaling=constrained);

[Maple Plot]

>

Un autre escargot

> x0:= -6.; li:= seq( (f@@k)(x0), k=0..8);

x0 := -6.

li := -6., -1.750000000, 11.00000000, -.7692307692,...

> pl4:= plots[pointplot]([li[1]$3, seq(X$4, X=li[2..-2]), li[-1]$3 ], style=line, color=green):

repérage de coordonnées sur le graphe

> display(pl1, pl4, view=[-7..4, -7..4], tickmarks=[[-6,4],[-6,4]]);

[Maple Plot]

>

Preuve de convergence

> phi:= unapply( (z-beta)/(z-alpha),z);

phi := proc (z) options operator, arrow; (z+3/2-1/2...

> 'theta=phi(z), Theta=phi(f(z))'; eqs:= {%};

theta = phi(z), Theta = phi(f(z))

eqs := {theta = (z+3/2-1/2*sqrt(13))/(z+3/2+1/2*sqr...

> solve(eqs, {z, Theta});
select(has,%,Theta); (factor@expand@rationalize@op)(%);

{Theta = theta*(-13+sqrt(13))/(13+sqrt(13)), z = -1...

{Theta = theta*(-13+sqrt(13))/(13+sqrt(13))}

Theta = 1/6*(-7+sqrt(13))*theta

>

>

>