function Example1(N)
%
% Solves the ivp y_{n+2}- (9/4)y_{n+1} + (1/2) y_{n} =0
%  y_0=4/3, y1=1/3
% 
%
fprintf('\n')
disp('______________________________________________')
disp('i          yclosed        yrec    ')
disp('______________________________________________')
%
ye=zeros(1,N);
yr=zeros(1,N);
ye(1,1:N)=(4/3)*(1/4).^(0:N-1);
%
yr(1,1)=4/3;yr(1,2)=1/3;
for i=3:N
    y0=yr(1,i-2);y1=yr(1,i-1);
    yr(1,i)=-(1/2)*y0+(9/4)*y1;
end
%
for i=1:N
fprintf(' %5.0f  %15.6e %15.6e\n',i-1,ye(1,i),yr(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('Closed form','Recurrence',1)
