function Ex8Notes(N,k)
%
% Solves the ivp y_{n+2}- y_{n+1} - y_{n} =0
%  y_0=0, y1=k
% 
%
fprintf('\n')
disp('______________________________________________')
disp('i         y_n         yclosed            ')
disp('______________________________________________')
%
ye=zeros(1,N);
yr=zeros(1,N);
ylim=zeros(1,N);
s1=(1+sqrt(5))/2;s2=(1-sqrt(5))/2;
ye(1,1:N)=(k/sqrt(5))*(s1.^(0:N-1)-s2.^(0:N-1));
%
yr(1,1)=0;yr(1,2)=k;
for i=3:N
    y0=yr(1,i-2);y1=yr(1,i-1);
    yr(1,i)=y0+y1;
end
%
ylim(1,3:N)=yr(1,3:N)./yr(1,2:N-1);
for i=1:N
fprintf(' %5.0f  %15.6e %15.6e %15.6e\n',i-1,ye(1,i),yr(1,i),ylim(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',3)
