Páginas

punto fijo multivariable con syms

clc 
clear all 
syms x10 x20 x30
y1=cos(x20*x30)/3+1/6
y2=sqrt(x10*x10+sin(x30) + 1.06)/9-0.1
y3=(1-exp(-x10*x20))-pi/6
x10=0.1;
x20=0.1;
x30=-0.1;
tolerancia=0.00001;
error= 20;
disp(' x11 x21 x31')
while( tolerancia<error)
x11=eval(y1);  
x21=eval(y2);
x31=eval(y3);
error= sqrt(power(x11-x10,2)+power(x21-x20,2)+power(x31-x30,2));
fprintf(' %2d %15.2f %15.2f \n',x11,x21, x31)
x10=x11;
x20=x21;
x30=x31;
end
fprintf(' %2d %15.2f %15.2f \n',x11,x21, x31)