You are on page 1of 4

}MÉTODO DE PUNTO FIJO

clear
format short
x0=0
for i=1:4
x=0.03737/((1*x0^2)-(0.27404)*x0+1.34);
errorabsoluto=abs(x-x0);
disp ([x,errorabsoluto])
x0=x;
end

x0 =

0.0279 0.0279

0.0280 0.0001

0.0280 0.0000

0.0280 0.0000

MÉTODO DE NEWTON RAPSHON


clear
format short
x0=0
for i=1:5
fx0=(1*x0^3)-(0.27404*x0^2)+(1.34*x0)-0.03737;
dx0=(3*1*x0^2)-(2*0.27404*x0)+1.34;
x=x0-(fx0/dx0);
errorabsoluto=abs(x-x0);
disp([x,errorabsoluto])
x0=x;
end

x0 =

0.0279 0.0279

0.0280 0.0001

0.0280 0.0000

0.0280 0.0000

0.0280 0
MÉTODO DE FALSA POSICIÓN
clear;
clc;
format short
xi=0;
xd=1;
EA=0.00001;
fxi=(1*xi^3)-(0.27404*xi^2)+(1.34*xi)-0.03737;
fxd=(1*xd^3)-(0.27404*xd^2)+(1.34*xd)-0.03737;
fxm=1
while abs(fxm)>EA;
xm=((xd)-(fxd*(xd-xi))/((fxd)-(fxi)));
fxm=(1*xm^3)-(0.27404*xm^2)+(1.34*xm)-0.03737;
disp([xi,xd,xm,abs(fxm)]);
if fxi*fxd>0;
xd=xm;fxd=fxm;
else
xi=xm;fxi=fxm;
end
end

fxm =

0 1.0000 0.0181 0.0132

0.0181 1.0000 0.0244 0.0048

0.0244 1.0000 0.0267 0.0017

0.0267 1.0000 0.0276 0.0006

0.0276 1.0000 0.0279 0.0002

0.0279 1.0000 0.0280 0.0001

0.0280 1.0000 0.0280 0.0000

0.0280 1.0000 0.0280 0.0000

0.0280 1.0000 0.0280 0.0000


MÉTODO DE LA BISECCIÓN
clear;
clc;
format short
xi=0;
xd=1;
EA=0.00001;
fxi=(1*xi^3)-(0.27404*xi^2)+(1.34*xi)-0.03737;
fxd=(1*xd^3)-(0.27404*xd^2)+(1.34*xd)-0.03737;
fxm=1
while abs(fxm)>EA;
xm=((xd)-(fxd*(xd-xi))/((fxd)-(fxi)));
fxm=(1*xm^3)-(0.27404*xm^2)+(1.34*xm)-0.03737;
disp([xi,xd,xm,abs(fxm)]);
if fxi*fxd>0;
xd=xm;fxd=fxm;
else
xi=xm;fxi=fxm;
end
end

fxm =

0 1.0000 0.5000 0.6891

0 0.5000 0.2500 0.2961

0 0.2500 0.1250 0.1278

0 0.1250 0.0625 0.0456

0 0.0625 0.0313 0.0043

0 0.0313 0.0156 0.0165

0.0156 0.0313 0.0234 0.0061

0.0234 0.0313 0.0273 0.0009

0.0273 0.0313 0.0293 0.0017

0.0273 0.0293 0.0283 0.0004

0.0273 0.0283 0.0278 0.0003

0.0278 0.0283 0.0281 0.0001

0.0278 0.0281 0.0280 0.0001

0.0280 0.0281 0.0280 0.0000

0.0280 0.0281 0.0280 0.0000

0.0280 0.0280 0.0280 0.0000


METODO DE LA SECANTE
format short
x0=0;
x1=1;
for i=1:9
f0=(1*x0^3)-(0.27404*x0^2)+(1.34*x0)-0.03737;
f1=(1*x1^3)-(0.27404*x1^2)+(1.34*x1)-0.03737;
x2=x1-(x1-x0)*f1/(f1-f0);
EA= abs(x2-x1);
disp([x2,EA])
x0=x1;x1=x2;
end

0.0181 0.9819

0.0244 0.0064

0.0280 0.0036

0.0280 0.0000

0.0280 0

clear;
clc;
format short
xi=0;
xd=1.5;
EA=0.00001;
fxi=(10*xi^3)-(15.006*xi^2)+(0.03412*xi)-0.00081;
fxd=(10*xd^3)-(15.006*xd^2)+(0.03412*xd)-0.00081;
fxm=1
while abs(fxm)>EA;
xm=(xi+xd/2);
fxm=(10*xm^3)-(15.006*xm^2)+(0.03412*xm)-0.00081;
disp([xi,xd,xm,abs(fxm)]);
if fxi*fxd>0;
xi=xm;fxi=fxm;
else
xd=xm;fxd=fxm;
end
end

You might also like