% This .m file creates the values of the Euler solution at the given times
% for the first example

% number of intervals in time is N and the mesh size is h= 1/N

format long g

% to reproduce Table 2.7.3 you need N=10,20,40,80, and 100

N=100;
h=1/N;

% the Euler solution is in the vector y -- y(i), i=1,2,...

% note that y(i) approximates Y(t) =exact((i-1)*h);

w(1)=1.0;

for i=1:5*N
    
    time = (i-1)*h;
    
    w(i+1)=w(i)+ h*fty(time,w(i));

end

w(1)
w(1+N)
w(1+2*N)
w(1+3*N)
w(1+4*N)
w(1+5*N)





% use either work space or "format long g" in command window