Documente Academic
Documente Profesional
Documente Cultură
%grafica de funciones
x=-2:0.1:2;
y1=x.^2+4*cos(2*x)-1;
y2=3*x.^3-26*x+6;
subplot(3,1,1);plot(y1);
subplot(3,1,2);plot(y2);
subplot(3,1,3);ezmesh('cos(sqrt(x.^2+y.^2))')
EJERCICO 2:
%ECUACIONES DIFERENCIALES
y=dsolve('D2y=-y-7','y(0)=1','Dy(0)=0','x');
P=simplify(y)
ezplot('8*cos(x) - 7');
hold on
plot(0,1,'r*')
>> ECUACIONESDIFERENCIALES
P=
8*cos(x) – 7
EJERCICO 3:
%INTEGRALES TRIPLES
funcion=@(x,y,z)x.*sin(y)-x.*cos(z);
xmin=-1;
xmax=1;
ymin=@(x)-sqrt(1-x.^2);
ymax=@(x)sqrt(1-x.^2);
zmin=@(x,y)-sqrt(1-x.^2-y.^2);
zmax=@(x,y)sqrt(1-x.^2-y.^2);
valor=integral3(funcion,xmin,xmax,ymin,ymax,zmi
n,zmax)
>> INTEGRALESTRIPLES
valor =
5.5511e-17
EJERCICO 4:
Bisección:
function f=f1(x)
f=exp(-2*x)-5*x;
>> bisect('f1',0,1,0.00001,50 )
_______________________________________________
iter a b c f(c) |b-a|/2
function f=f2(x)
f=x.^5-3*x.^2+1;
>> bisect('f2',1,2,0.00001,50 )
_______________________________________________
iter a b c f(c) |b-a|/2
Newton:
EJERCICO 5: