function Ch2Example2(N,a,b)
%
% Solves the ivp y_{n+1}- 10.1 y_{n} +  y_{n-1} =0
%  y_0=a, y1=b
% 
%
fprintf('\n')
disp('_____________________________________________________________________________')
disp('     i        y_n            yclosed          abs error        rel error    ')
disp('_____________________________________________________________________________')
%
ye=zeros(1,N);
yr=zeros(1,N);
%ye=((10.0*b -a)/99.d0)*10.d0^i + ((100.0*a - 10.0*b)/99.0)*10.0^(-i);
ye(1,1:N)=((10*b-a)/99)*10.^(0:N-1)+((100*a-10*b)/99)*10.^(-(0:N-1));              
%
yr(1,1)=a;yr(1,2)=b;
for i=3:N
    y0=yr(1,i-2);y1=yr(1,i-1);
    yr(1,i)=-y0+10.1*y1;
end
%
for i=1:N
fprintf(' %5.0f  %15.6e  %15.6e  %15.6e  %15.6e\n',i-1,yr(1,i),ye(1,i),abs(yr(1,i)-ye(1,i)),abs(yr(1,i)-ye(1,i))/abs(ye(1,i)))
end
xx=zeros(1,N);
xx(1,1:N)=(0:N-1);
plot(xx,ye,'r*',xx,yr,'b+')
xlabel('n','Fontsize',14);ylabel('y_n','Fontsize',14);
legend('Recurrence','Closed form',1)
