clear all
f=@(x,y) 3*y+x*x
G=@(x) -2/27-2/9*x-1/3*x.*x+13/540*exp(3*x)
N=50
h=(1-0)/N;
xn=0;
yn=-1/20;
for n=1:N
    yn=yn+h*f(xn,yn);
    xn=0+h*n;
    x(n)=xn;
    y(n)=yn;
end;
Y=G(x);
hold off
plot(x,y,'r');
hold on
plot(x,Y,'g');
