10
-6 -4 -2 2 4 6
Out[181]=
-10
-20
2 Problema 6.3 a).nb
n = 7; (*iteraciones*)
XF[n] = 100;
In[165]:=
i xi Ea
0. 5. 49.0909
1. 3.35366 19.7166
Out[171]=
2. 2.80133 2.9482
3. 2.72111 0.0649796
4. 2.71934 0.0000315554
Problema 6.3 a).nb 3
In[172]:= B = Array[VXF, {i + 1, 2}, {0, 1}]; (*Guarda los puntos para la recta y=x y y=g(x),
arreglo
primero guarda el punto VXF[0,1]=x[0],VXF[0,2]=0 que corresponde al punto
inical x0,0 y VXF[1,1]=x[0],VXF[1,2]=g[x[0]] que correspnde a un punto de y=
g(x),despues VXF[2,1]=x[1],VXF[2,2]=x[1] que corresponde a y=
x y VXF[3,1]=x[1],VXF[3,2]=F[x[1]] que corresponde a un punto en y=
g(x) y asi sucesivamente*)
Fors = 0, s ≤ i + 1, s += 2,
para cada
If[s 0, VXF[0, 1] = x[0];
si
VXF[0, 2] = 0;
VXF[1, 1] = x[0];
VXF[1, 2] = g[x[0]];
]
Ifs > 0, VXF[s, 1] = xs 2;
si
VXF[s, 2] = xs 2;
VXF[s + 1, 1] = xs 2;
VXF[s + 1, 2] = gxs 2;
4 Problema 6.3 a).nb
Out[179]=
Problema 6.3 a).nb 5
In[176]:= Show[G1, G3](*se representan las grafica junto con las flechas*)
muestra
10
-6 -4 -2 2 4 6
Out[176]=
-10
-20