h=0.5; x=[0:h:4]; %generate x points n=length(x); y(1)=1; %initial condition for (ii=1:n-1) y(ii+1)=y(ii)+(-2*x(ii)^3+12*x(ii)^2-20*x(ii)+8.5)*h; end solution=[x' y']