PUNTU FINKOKO METODOA

1.

f[x_]=Exp[-x]-x

Plot[f[x],{x,0.5,0.6}]

g1[x_]=Exp[-x]

g2[x_]=-Log[x]

Plot[{g1'[x],g2'[x]},{x,0.5,0.6}]

konbergentzia aztertuta, g1 erabiliko dut , Abs [g1’(x)]<1 baldintza betetzen baitu
t= 6 zifra esanguratsu erabilita

x0=0;tol=0.1;err=tol+1;i=1;
While[err>tol&&i<50,x1=SetPrecision[g1[x0],6];err=Abs[(x0-x1)/x1];Print[i," garren hurbilketa = ",x1," eta errorea = ",err];x0=x1;i=i+1]

2.

f[x_]=x-Exp[x/5]

Plot[f[x],{x,0,2}]

g1[x_]=Exp[x/5]

g2[x_]=5*Log[x]

Plot[{g1'[x],g2'[x]},{x,1.0,1.5}]

g1 erabili, konbergitzen duelako

x0=0.;i=0;tol=0.1;err=tol+1;
While[i<50&&err>tol,x1=SetPrecision[g1[x0],6];err=Abs[(x1-x0)/x1];i=i+1;x0=x1;Print[i," garren iterazioan hurbilketa = ",x1," eta errorea = ",err]]