
Tint = [0 2];
y0   = 0;


for i = 0:3
    for j = 0:4
        lambda = 10^i;
        dt     = 10^(-j);
        f = @(t,u) -lambda*(u-sin(pi*t)) + pi*cos(pi*t);
        [x,y] = EF(f,Tint,y0,dt);
        emax = max(abs(y - sin(pi*x)));
        % plot(x,y,x,sin(pi*x));
        fprintf('The value of u(2) at lambda = %.2g and dt = %.2g is %0.2d and max error is %0.2d \n',...
            lambda,dt,y(end), emax);
    end
end
