You are on page 1of 1

clc

x=1;
y=-1;
h=(2-1)/2000;
for x=1:h:2-h
f=x-3*y/x;
x1=x+h;
y1=y+h*f;
f1=x1-3*y1/x1;
y=y+h/2*(f+f1);
end
disp('Sol aprox:');y

You might also like